Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
DOORS Site Logo

Welcome to the Official DOORS Wiki!
Please read the Wiki Rules the Manual of Style and familiarise yourself with our Wiki Policies before contributing to get a better understanding of what content is allowed on our wiki and how to display it properly, if you need help don't hesitate to reach out to a DOORS Wiki Staff Member.

Editing Template:Hatnote/doc

Template page
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

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 1: Line 1:
<noinclude>{{Documentation subpage}}</noinclude>
The hatnotes used for adding links between articles where more context is important.
The hatnotes used for adding links between articles where more context is important.
Broadly speaking, a hatnote should answer a readers' question: Am I on the right page?
Broadly speaking, a hatnote should answer a readers' question: Am I on the right page?
Line 6: Line 5:


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


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


== Parameters ==
== Parameters ==
Line 21: Line 20:
== Example ==
== Example ==


* <code><nowiki>{{Hatnote|Example hatnote text}}</nowiki></code> → {{Hatnote|Example hatnote text}}
* <code><nowiki>{{hatnote|Example hatnote text}}</nowiki></code> → {{hatnote|Example hatnote text}}


== Typical types ==
== Typical types ==
Line 35: Line 34:
:*<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 ==
Templates such as {{T|HatAbout}} and {{T|For}} are to be used in cases where a disambiguation is not needed. In general, disambiguation pages should only be used for 4 or more titles that are mostly or entirely identical, except for a qualifier.
Templates such as {{T|About}} and {{T|For}} are to be used in cases where a disambiguation is not needed. In general, disambiguation pages should only be used for 4 or more titles that are mostly or entirely identical, except for a qualifier.
;{{T|HatAbout}}: Links the reader to other articles with similar titles or concepts that they may have been seeking instead. The template has several formats, including:
;{{T|About}}: Links the reader to other articles with similar titles or concepts that they may have been seeking instead. The template has several formats, including:
:;{{T|HatAbout|Use1}} →:{{HatAbout|}}
:;{{T|About|Use1}} →:{{About|}}
:;{{T|HatAbout|Use1|<nowiki/>|Main Page}} →:{{HatAbout|Use1||Main Page}}
:;{{T|About|Use1|<nowiki/>|Main Page}} →:{{About|Use1||Main Page}}
:;{{T|HatAbout|Use1|<nowiki/>|Main Page|and|Main Page}} →:{{HatAbout|Use1||Main Page|and|Main Page}}
:;{{T|About|Use1|<nowiki/>|Main Page|and|Main Page}} →:{{About|Use1||Main Page|and|Main Page}}
:;{{T|HatAbout|Use1|Use2|Main Page}} →:{{HatAbout|Use1|Use2|Main Page}}
:;{{T|About|Use1|Use2|Main Page}} →:{{About|Use1|Use2|Main Page}}
:;{{T|HatAbout|Use1|Use2|Main Page|and|Main Page}} →:{{HatAbout|Use1|Use2|Main Page|and|Main Page}}
:;{{T|About|Use1|Use2|Main Page|and|Main Page}} →:{{About|Use1|Use2|Main Page|and|Main Page}}
:;{{T|HatAbout|Use1|Use2|Main Page|other uses}} →:{{HatAbout|Use1|Use2|Main Page|other uses}}
:;{{T|About|Use1|Use2|Main Page|other uses}} →:{{About|Use1|Use2|Main Page|other uses}}


Alternately, a <code>section=yes</code> parameter can be added to the {{T|HatAbout}} template for use at the top of a section. When using this parameter, the wording in the template changes to specify that it is being used in a section:
Alternately, a <code>section=yes</code> parameter can be added to the {{T|About}} template for use at the top of a section. When using this parameter, the wording in the template changes to specify that it is being used in a section:
:;{{T|HatAbout|Use1|<nowiki>section=yes</nowiki>}} →:{{HatAbout|Use1|section=yes}}
:;{{T|About|Use1|<nowiki>section=yes</nowiki>}} →:{{About|Use1|section=yes}}
:;{{T|HatAbout|Use1|<nowiki/>|Main Page|<nowiki>section=yes</nowiki>}} →:{{HatAbout|Use1||Main Page|section=yes}}
:;{{T|About|Use1|<nowiki/>|Main Page|<nowiki>section=yes</nowiki>}} →:{{About|Use1||Main Page|section=yes}}
:;{{T|HatAbout|Use1|Use2|Main Page|<nowiki>section=yes</nowiki>}} →:{{HatAbout|Use1|Use2|Main Page|section=yes}}
:;{{T|About|Use1|Use2|Main Page|<nowiki>section=yes</nowiki>}} →:{{About|Use1|Use2|Main Page|section=yes}}
:;{{T|HatAbout|Use1|Use2|Main Page|and|Main Page|<nowiki>section=yes</nowiki>}} →:{{HatAbout|Use1|Use2|Main Page|and|Main Page|section=yes}}
:;{{T|About|Use1|Use2|Main Page|and|Main Page|<nowiki>section=yes</nowiki>}} →:{{About|Use1|Use2|Main Page|and|Main Page|section=yes}}
:;{{T|HatAbout|Use1|Use2|Main Page|other uses|<nowiki>section=yes</nowiki>}} →:{{HatAbout|Use1|Use2|Main Page|other uses|section=yes}}
:;{{T|About|Use1|Use2|Main Page|other uses|<nowiki>section=yes</nowiki>}} →:{{About|Use1|Use2|Main Page|other uses|section=yes}}


A <var>text</var> option adds text to the end; note that this should be only used when truly necessary, and the other hatnote templates listed below don't suffice. This template also supports <var>selfref</var>.
A <var>text</var> option adds text to the end; note that this should be only used when truly necessary, and the other hatnote templates listed below don't suffice. This template also supports <var>selfref</var>.
Line 59: Line 59:


:;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)]].}}
::{{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)]].}}
::{{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 73: Line 73:


If no hatnote text is supplied, the template will output the following message:
If no hatnote text is supplied, the template will output the following message:
* {{Hatnote|category=no}}
* {{hatnote|category=no}}


If you see this error message, it is for one of four reasons:
If you see this error message, it is for one of four reasons:
Line 82: Line 82:


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 88:


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>


<includeonly>[[Category:Notice templates]]</includeonly>
<includeonly>[[Category:Notice templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>
Please note that all contributions to DOORS Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see DOORS Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)
Below are some commonly used wiki markup codes. Simply click on what you want to use and it will appear in the edit box above.

View this template