The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 6: | Line 6: | ||
; Basic usage: |
; Basic usage: |
||
{{ |
{{hatnote|''text''}} |
||
; All parameters: |
; All parameters: |
||
{{ |
{{hatnote|''text''|extraclasses=''extra classes''|selfref=''yes''|category=''no''}} |
||
== Parameters == |
== Parameters == |
||
Line 21: | Line 21: | ||
== Example == |
== Example == |
||
* <code><nowiki>{{ |
* <code><nowiki>{{hatnote|Example hatnote text}}</nowiki></code> → {{Hatnote|Example hatnote text}} |
||
== Typical types == |
== Typical types == |
||
Line 35: | Line 35: | ||
:*<code>1</code>, <code>2</code>, <code>3</code>, ... – the pages to link to. If no page names are specified, the current page name is used instead (without the namespace prefix). Categories and files are automatically escaped with the [[w:Help:Colon trick|colon trick]], and links to sections are automatically formatted as ''page § section'', rather than the MediaWiki default of ''page#section''. |
:*<code>1</code>, <code>2</code>, <code>3</code>, ... – the pages to link to. If no page names are specified, the current page name is used instead (without the namespace prefix). Categories and files are automatically escaped with the [[w:Help:Colon trick|colon trick]], and links to sections are automatically formatted as ''page § section'', rather than the MediaWiki default of ''page#section''. |
||
:*<code>l1</code>, <code>l2</code>, <code>l3</code>, ... ''or''<code>label 1</code>, <code>label 2</code>, <code>label 3</code>, ... – optional labels for each of the pages to link to (this is for articles where a piped link would be used). Note that the extra parameters use a lower case 'L', for example, <code>l1</code>, <u>not</u> <code>L1</code>. |
:*<code>l1</code>, <code>l2</code>, <code>l3</code>, ... ''or''<code>label 1</code>, <code>label 2</code>, <code>label 3</code>, ... – optional labels for each of the pages to link to (this is for articles where a piped link would be used). Note that the extra parameters use a lower case 'L', for example, <code>l1</code>, <u>not</u> <code>L1</code>. |
||
:*<code>selfref</code> – if set to "yes", "y", "true" or "1", adds the CSS class "selfref". This is used to denote self-references |
:*<code>selfref</code> – if set to "yes", "y", "true" or "1", adds the CSS class "selfref". This is used to denote self-references. |
||
== Disambiguation == |
== Disambiguation == |
||
Line 59: | Line 60: | ||
:;If used without parameters on a page named ''Foo'', the result is |
:;If used without parameters on a page named ''Foo'', the result is |
||
::{{ |
::{{hatnote|For other uses, see [[:Foo (disambiguation)]].}} |
||
:;The first parameter changes the hatnote itself and should be plain text, e.g. {{T|For|similar terms}} yields |
:;The first parameter changes the hatnote itself and should be plain text, e.g. {{T|For|similar terms}} yields |
||
::{{ |
::{{hatnote|For similar terms, see [[:Foo (disambiguation)]].}} |
||
:;The second parameter is used to change the resultant link, e.g. {{T|For|similar terms|Main Page}} yields |
:;The second parameter is used to change the resultant link, e.g. {{T|For|similar terms|Main Page}} yields |
||
::{{For|similar terms|Main Page}} |
::{{For|similar terms|Main Page}} |
||
Line 82: | Line 83: | ||
Pages that contain this error message are tracked in [[:Category:Hatnote templates with errors]]. |
Pages that contain this error message are tracked in [[:Category:Hatnote templates with errors]]. |
||
== Technical details == |
== Technical details == |
||
Line 87: | Line 89: | ||
The HTML code produced by this template looks like this: |
The HTML code produced by this template looks like this: |
||
* <code><nowiki><div role="note" class="hatnote"></nowiki>''hatnote text''<nowiki></div></nowiki></code> |
* <code><nowiki><div role="note" class="hatnote"></nowiki>''hatnote text''<nowiki></div></nowiki></code> |
||