Template:Hatnote: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(Create.)
 
(see also)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div role="note" class="hatnote {{{extraclasses|}}}">{{{1|{{{text}}}}}}</div><noinclude>
<div role="note" class="hatnote noexcerpt {{{extraclasses|}}}">{{{1|{{{text}}}}}}</div><noinclude>{{documentation|content=
 
This template produces formatted text, following the guideline for a '''hatnote'''.
This template produces formatted text, following the guideline for a '''hatnote'''.
:<code><nowiki>{{hatnote|Example hatnote text.}}</nowiki></code> &rarr;<br/><!-- a construct to show hatnote as expected (using newline) -->
:<code><nowiki>{{hatnote|Example hatnote text.}}</nowiki></code> &rarr;<br/><!-- a construct to show hatnote as expected (using newline) -->
Line 26: Line 25:


* <code><nowiki>{{hatnote|Example hatnote text}}</nowiki></code> → {{hatnote|Example hatnote text}}
* <code><nowiki>{{hatnote|Example hatnote text}}</nowiki></code> → {{hatnote|Example hatnote text}}
== Template data ==
<templatedata>
{
"description": {
"en": "Template for creating a standard hatnote. A hatnote is a short note placed at the top of an article or section to direct users to related pages",
"cs": "Šablona pro vytvoření standardní hatnote. Hatnote je krátká poznámka umístěná v horní části článku nebo sekce, která uživatele nasměruje na související stránky"
},
"format": "inline",
"params": {
"1": {
"aliases": [
"text"
],
"label": "Text",
"description": {
"en": "This field should contain the text that will be displayed in the hatnote.",
"cs": "Toto pole by mělo obsahovat text, který se zobrazí v hatnote."
},
"type": "string",
"required": true,
"example": {
"en": "Insert text here.",
"cs": "Sem vložte text."
}
},
"extraclasses": {
"label": {
"en": "Extra classes",
"cs": "Extra třídy"
},
"description": {
"en": "Comma-separated list of CSS class names",
"cs": "Seznam názvů tříd CSS oddělených čárkami"
},
"type": "string"
}
},
  "paramOrder": [
    "1",
    "extraclasses"
  ]
}
</templatedata>
== See also ==
* {{tl|About}}
* {{tl|Confused with}}
* {{tl|Main}}
* {{tl|Redirect}}
* {{tl|See also}}


== Attribution ==
== Attribution ==
Taken from [https://www.mediawiki.org/wiki/Template:Hatnote MediaWiki].
Taken from [https://www.mediawiki.org/wiki/Template:Hatnote MediaWiki] under [https://creativecommons.org/licenses/by-sa/4.0/deed.en CC BY-SA 4.0] license.


[[Category:Templates]]
[[Category:Templates]]}}
</noinclude>
</noinclude>

Latest revision as of 00:58, 23 January 2024

{{{text}}}
Template documentation

This template produces formatted text, following the guideline for a hatnote.

{{hatnote|Example hatnote text.}}
Example hatnote text.

Broadly speaking, a hatnote should answer a readers' question (maybe preemptively): Am I on the right page?

Function

This template is primarily used to add a correctly formatted hatnote to a page. Often, but not always, this is a disambiguation link at the top of article pages. It places an HTML div- / div block around the text entered as its only argument, which provides standardized formatting (contents are indented and italicized in most displays); it also isolates the contained code to make sure that it is interpreted correctly.

This template is also used as the "meta-template" for additional specialized disambiguation link templates.

The template does not automatically create links of any kind. Links and other desired formatting must be explicitly added, using normal wiki markup.

Usage

{{hatnote|text}}

Parameters

This template accepts the following parameters:

  • 1 - the hatnote text (required)

Example

  • {{hatnote|Example hatnote text}}
    Example hatnote text

Template data

Template for creating a standard hatnote. A hatnote is a short note placed at the top of an article or section to direct users to related pages

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Text1 text

This field should contain the text that will be displayed in the hatnote.

Example
Insert text here.
Stringrequired
Extra classesextraclasses

Comma-separated list of CSS class names

Stringoptional

See also

Attribution

Taken from MediaWiki under CC BY-SA 4.0 license.