Template:Hatnote

From Wikimedia Commons, the free media repository
(Redirected from Template:Dablink)
Jump to navigation Jump to search
{{{1}}}
Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:Hatnote/doc.

This template formats text into the standard stylistic for a Wikipedia hatnote. That produces a short note placed at the top of an article to provide disambiguation of closely related terms or summarize a topic, explaining its boundaries.

Usage

{{Hatnote |1= |lang= |class= }}

Or use the shorthand
{{dablink|… parameters as described …}}

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; see en:Wikipedia:Otheruses templates (example usage) for a list.

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

Template parameters

<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. ‎<nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw ‎<templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.

Discussion
There is an ongoing discussion about that matter. Feel invited to comment if you are experienced in either way, your time permits and if you like to share your opinion or to make a suggestion.


Wikipedia's help about TemplateDataCommons-specific information

This template formats text into the standard stylistic for a Wikipedia hatnote. That produces a short note placed at the top of an article to provide disambiguation of closely related terms or summarize a topic, explaining its boundaries.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
content1

The content of the hatnote

Contentrequired
classclass

Additional class of the hatnote. For example: noitalic

Linesuggested
languagelang

Language code of the content of the hatnote. Providing this enhances accessibility (correct text directionality, fonts, screen reader language etc.), so always use this parameter if the language is known.

Linesuggested

Additional information

The template is intended to be used in the following namespaces: no namespace specified

The template is intended to be used by the following user groups: no user group specified

Placement: At the top of the page

Example

{{Hatnote|text}}

renders as:

text

Localization

This template is not intended to be localized.