Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Hatnote/doc: Difference between revisions

Template page
Created page with '{{Documentation subpage}} ==Usage== Using {{tlx|Hatnote|''text''}} formats text into the standard stylistic for a Wikipedia hatnote. ...'
 
use {{TemplateBox}}, uses TemplateStyles
Line 1: Line 1:
{{Documentation subpage}}
{{Uses TemplateStyles|Template:Hatnote/styles.css}}
{{TemplateBox
  |1        = 1
  |1label-en= content
  |1d-en    = The content of the hatnote
  |1aliases = <!-- List of aliases, separated by / (a slash) -->
  |1type    = content
  |1def    = <!-- default value for the parameter -->
  |1stat    = required


==Usage==
  |name              = Hatnote
Using {{tlx|Hatnote|''text''}} formats text into the standard stylistic for a [[:en:Wikipedia:Hatnote|Wikipedia hatnote]]. That produces a short note placed at the top of an article to provide disambiguation of closely related terms or summarise a topic, explaining its boundaries.
  |desc-en            = This template formats text into the standard stylistic for a [[:en:Wikipedia:Hatnote|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.
 
    |desc-td-en      = 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.
===Function===
  |usage-notes        = 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 <code>div-</code> / <code>div</code> 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 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 <code>div-</code> / <code>div</code> 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.
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 [[:en:Wikipedia:Cheatsheet|Wikipedia markup]].
The template does not automatically create links of any kind. Links and other desired formatting must be explicitly added, using normal [[:en:Wikipedia:Cheatsheet|Wikipedia markup]].
 
  |namespace          =
===Code===
  |usergroup          =
<code><nowiki><div class="dablink"></div></nowiki></code>
  |shorthand          = dablink
 
  |mustbesubst        =  
==Redirects==
  |setscats          =  
*{{tl|Dablink}}
  |placement          = top
  |example            = text
  |example-value      =  
  |relieson          =  
  |seealso            =  
  |print              =  
  |type              =
  |i18n-method        = -
  |i18n-desc          =  
  |i18n-subpage      =  
  |i18n-mediawiki-msg =  
  |useTemplateData    = only
}}

Revision as of 15:44, 10 March 2020

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= }}

Or use the shorthand

dablink

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.


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

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
content1

The content of the hatnote

Contentrequired

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.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.