Vorlage:Hatnote/doc: Unterschied zwischen den Versionen

K
172 Versionen von wpen:Template:Hatnote/doc importiert
Keine Bearbeitungszusammenfassung
K (172 Versionen von wpen:Template:Hatnote/doc importiert)
 
(3 dazwischenliegende Versionen von 3 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
{</nowco( hatnote
{{Documentation subpage}}
{{Redirect|Template:Dablink|the maintenance template|Template:Dablinks}}
{{High-use| 369726 }}
{{Never substitute}}
{{lua|Module:Hatnote}}


Broadly speaking, a hatnote shou
This template produces formatted text, following the guideline for a '''[[WP:HATNOTE|Wikipedia hatnote]]'''.
:<code><nowiki>{{hatnote|Example hatnote text.}}</nowiki></code> &rarr;<br><!-- a construct to show hatnote as expected (using newline) -->
{{hatnote|Example hatnote text.}}
 
Broadly speaking, a hatnote should answer a reader's question (maybe preemptively): ''Am I on the right page?''
 
{{TOC limit}}


== Function ==
== Function ==
This template is primarily used to add a correctly formattedl to a page. Often, but noaround 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 template for a list.
This template is also used as the "meta-template" for additional specialized disambiguation link templates; see [[:Category:Hatnote templates]] 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:Cheatsheet|Wikipedia markup]].
The template does not automatically create links of any kind. Links and other desired formatting must be explicitly added, using normal [[Wikipedia:Cheatsheet|Wikipedia markup]].


== Usage ==
; Basic usage:
&#123;{hatnote|''text''}}


; All parameters:
&#123;{hatnote|''text''|extraclasses=''extra classes''|selfref=''yes''|category=''no''}}


 
== Parameters ==
 
This template accepts the following parameters:
 
* <code>1</code> – the hatnote text (required)
 
* <code>extraclasses</code> – any extra CSS classes to be added, for example, the {{tl|see also}} template adds the classes "{{para|extraclasses|boilerplate seealso}}".
 
* <code>selfref</code> – If set to "yes", "y", "true" or "1", adds the CSS class "selfref". This is used to denote self-references to Wikipedia. See [[Template:Selfref]] for more information.
 
* <code>category</code> – If set to "no", "n", "false", or "0", suppresses the error tracking category ([[:Category:Hatnote templates with errors]]). This has an effect only if the <!--"first-positional parameter", not "first positional parameter", if you value the readers' time ... but better yet --> leftmost parameter (the hatnote text) is omitted.
 
 
 
 
 
 
 
 
 
 
([[:Category:Hatnote templates with errors]]). This has an effect only if the <!--"first-positional parameter", not "first positional parameter", if you value the readers' time ... but better yet --> leftmost parameter (the hatnote text) is omitted.


== Example ==
== Example ==