Jump to content

User:Sardanaphalus/Template:Hatnote templates documentation

From Wikipedia, the free encyclopedia




<!-----------------------------------------------------------------------------
                                 This ... is
 ------------------------------------------------------------------------------>

{{Start hidden section
 |showhide=left |expanded={{#switch:{{{1|}}}|this=true}}
 |titlestyle=font-size:120%; |title=''This'' ... ''is'' ...
 |contentstyle=background:ghostwhite;font-size:105%;
}}

 [ {{introduction}} ]

{{End hidden section}}

===[Hatnotes by/for article/page type?]===
----
<!--------------------- Family names / Lists ------------------------>
{{Start hidden section
 |showhide=left |expanded={{#switch:{{{1|}}}|names|lists=true}}
 |titlestyle=font-size:120%; |title=For family names{{dot}}Lists
 |contentstyle=background:ghostwhite;font-size:105%;
}}
; {{big|Family names}}
{{see|:Category:Hatnote templates for names}}

; {{big|Lists}}
{{see|:Category:Hatnote templates for lists}}
{{/Table
 |class=nowrap |style=line-height:0.8em;overflow:auto;

 |colheaders=on
| {{/tlp|main list{{!}}(P1)}} | {{main list|(P1)}}
}}
{{End hidden section}}

<!--------------------- Category/user pages ------------------------->
{{Start hidden section
 |showhide=left |expanded={{#switch:{{{1|}}}|category|categories|user=true}}
 |titlestyle=font-size:120%; |title=For category or user pages
 |contentstyle=background:ghostwhite;font-size:105%;
}}
<!---col1width used: 25.0em--->
Hatnotes for use on [[Help:Category#Category pages|category pages]]:
{{/Table
 |col1width=25.0em

 |colheaders=on
| {{/tlp|category main{{!}}(P1)}} | {{category main|(P1)}}
 <!--[Rewrite/recast/exclude?:] [The following] is a template for linking categories ''horizontally''. Horizontal linkage is often the right solution when ''vertical linkage'' (i.e. as sub-category and parent category) is not appropriate. In most cases, this template should be used on ''both'' categories to create ''reciprocal linkage'' between the two categories.--> | {{/tlp|category see also{{!}}(P1)|(P2)|(P3)}} | {{category see also|(P1)|(P2)|(P3)}}
 | {{/tlp|category explanation{{!}}[text]}} | {{category explanation|[text]}}
 | {{/tlp|category pair{{!}}(P1)|(P2)}}   | {{category pair|(P1)|(P2)}}
 | {{/tlp|preceding category{{!}}(W)}}  | {{preceding category|(W)}}
 | {{/tlp|succeeding category{{!}}(P2)}} | {{succeeding category|(P2)}}
 | {{/tlp|contrast{{!}}(P1)|(P2)}}        | {{hatnote|(PAGENAME) is often contrasted with [[(P1)]] or [[(P2)]].}}
 | {{contrast|copula{{=}}are|(P1)|(P2)|}}    | {{hatnote|(PAGENAME) are often contrasted with [[(P1)]] or [[(P2)]].}}
}}

Hatnotes for use on [[Wikipedia:User pages|user pages]]:
{{/Table
 |col1width=25.0em
 | {{/tlp|this user talk{{!}}(topic)|(P1)}} | {{this user talk|(topic)|(P1)}}
}}
{{End hidden section}}

<!---------------------------- Other -------------------------------->
{{Start hidden section
 |showhide=left |expanded={{#switch:{{{1|}}}|other=true}}
 |titlestyle=font-size:120%; |title=Other hatnotes
 |contentstyle=background:ghostwhite;font-size:105%;
}}
<div>{{/tlp|Pope Stephen ToP Dab{{!}}X}} produces: {{Pope Stephen ToP Dab|X}}</div>
<div>{{/tlp|selfref{{!}}[text]}} produces: {{selfref|[text]}}</div>
For more information about self-referencing, see [[Wikipedia:Manual of Style/Self-references to avoid]].
{{End hidden section}}

===Hatnotes by template===
----
{{Start hidden section
 |showhide=left |expanded={{#switch:{{{1|}}}|by template|templates=true}}
 |titlestyle=font-size:120%; |title=Hatnotes by template
 |contentstyle=background:ghostwhite;font-size:105%;
}}
Note: "[text]" in the table below usually indicates a parameter that can include one or more links with or without labels ({{mono|[[Link|label]]}} or {{mono|[[Link]]}}).

{{/Table
 |cols=3 |class=nowrap |style=line-height:0.8em;overflow:auto;
 |col1style=padding-right:1.5em;
 |row1style=padding-bottom:0.5em;border-bottom:1px solid #aaa;
 | '''Template'''           | {{105%|'''Typical use...'''}} | {{nbsp|2}}'''...and output''' {{90%|(normally on new line)}}
 |row2style=padding-top:0.5em;
 | {{tlbare|about}}         | <nowiki>{{about|[use1]|[use2]|(P1)}} | {{about|[use1]|[use2]|(P1)}}
 | {{tlbare|about-distinguish}} | <nowiki>{{about-distinguish|[use1]|(P1)}} | {{about-distinguish|[use1]|(P1)}}
 | {{tlbare|about-distinguish2}} | <nowiki>{{about-distinguish2|[use1]|[text]}} | {{about-distinguish|[use1]|[text]}}
 | {{tlbare|category explanation}} | <nowiki>{{category explanation|[text]}} | {{category explanation|[text]}}
 | {{tlbare|category main}} | <nowiki>{{category main|(P1)}} | {{category main|(P1)}}
 | {{tlbare|category pair}} | <nowiki>{{category pair|(W)|(P2)}} | {{category pair|(W)|(P2)}}
 | {{tlbare|category see also}} | <nowiki>{{category see also|(P1)}} | {{category see also|(P1)}}
 | {{tlbare|contrast}}      | <nowiki>{{contrast|(P1)|(P2)}}  | {{hatnote|(PAGENAME) is often contrasted with [[(P1)]] or [[(P2)]].}}
 | {{tlbare|details}}       | <nowiki>{{details|(P1)}}       | {{details|(P1)}}
 | {{tlbare|distinct}}      | <nowiki>{{distinct|[text]}}   | {{distinct|[text]}}
 | {{tlbare|distinguish}}   | <nowiki>{{distinguish|(P1)}}   | {{distinguish|(P1)}}
 | {{tlbare|distinguish2}}  | <nowiki>{{distinguish|[text]}} | {{distinguish|[text]}}
 | {{tlbare|for}}           | <nowiki>{{for|(topic)|(P1)}}   | {{for|(topic)|(P1)}}
 | {{tlbare|for2}}          | <nowiki>{{for2|(topic)|[text]}} | {{for2|(topic)|[text]}}
 | {{tlbare|further}}       | <nowiki>{{further|(P1)}}       | {{further|(P1)}}
 | {{tlbare|further2}}      | <nowiki>{{further2|[text]}}   | {{further2|[text]}}
 | {{tlbare|hatnote}}       | <nowiki>{{hatnote|[text]}}    | {{hatnote|[text]}}
 | {{tlbare|main}}          | <nowiki>{{main|(P1)}}          | {{main|(P1)}}
 | {{tlbare|main list}}     | <nowiki>{{main list|(P1)}}     | {{main list|(P1)}}
 | {{tlbare|other hurricanes}} | <nowiki>{{other hurricanes|(P1)}} | {{other hurricanes|(P1)}}
 | {{tlbare|other people}}  | <nowiki>{{other people|(name)|(P1)}} | {{other people|(name)|(P1)}}
 | {{tlbare|otherpeople2}}  | <nowiki>{{subst:Otherpeople2|(P1)}}  | {{subst:Otherpeople2|(P1)}}
 | {{tlbare|otherpeople3}}  | <nowiki>{{otherpeople3|(name1)|(name2)|(P1)}} | {{otherpeople3|(name1)|(name2)|(P1)}}
 | {{tlbare|otherpeople5}}  | <nowiki>{{otherpeople5|(name1)|(name2)|(name3)|(name4)}} | {{otherpeople5|(name1)|(name2)|(name3)|(name4)}}
 | {{tlbare|other places}}  | <nowiki>{{other places|(P1)}}  | {{other places|(P1)}}
 | {{tlbare|otherplaces3}}  | <nowiki>{{otherplaces3|(P1)}}  | {{otherplaces3|(P1)}}
 | {{tlbare|other ships}}   | <nowiki>{{other ships|(P1)}}   | {{other ships|(P1)}}
 | {{tlbare|other uses}}    | <nowiki>{{other uses|(P1)}}    | {{other uses|(P1)}}
 | {{tlbare|otheruses2}}    | <nowiki>{{otheruses2|(P1)}}    | {{otheruses2|(P1)}}
 | {{tlbare|other uses of}} | <nowiki>{{other uses of|(topic)}} | {{other uses of|(topic)}}
 | {{tlbare|preceding category}} | <nowiki>{{preceding category|(W)}} | {{preceding category|(W)}}
 | {{tlbare|redirect}}      | <nowiki>{{redirect|(term)|(P1)}} | {{redirect|(term)|(P1)}}
 | {{tlbare|redirect2}}     | <nowiki>{{redirect2|(term1)|(term2)|[use]|(P1)}} | {{redirect2|(term1)|(term2)|[use]|(P1)}}
 | {{tlbare|redirect3}}     | <nowiki>{{redirect3|(term)|[text]}} | {{redirect3|(term)|[text]}}
 | {{tlbare|redirect text}} | <nowiki>{{redirect text|(term)|[text]}} | {{redirect text|(term)|[text]}}
 | {{tlbare|redirect-synonym}} | <nowiki>{{redirect-synonym|(term)|(topic)}} | {{redirect-synonym|(term)|(topic)}}
 | {{tlbare|redirect-distinguish}} | <nowiki>{{redirect-distinguish|(term)|(P1)}} | {{redirect-distinguish|(term)|(P1)}}
 | {{tlbare|redirect-distinguish2}} | <nowiki>{{redirect-distinguish2|(term)|[text]}} | {{redirect-distinguish2|(term)|[text]}}
 | {{tlbare|see also}}      | <nowiki>{{see also|(P1)}}      | {{see also|(P1)}}
 | {{tlbare|seealso2}}      | <nowiki>{{seealso2|[text]}}   | {{seealso2|[text]}}
 | {{tlbare|selfref}}       | <nowiki>{{selfref|[text]}}    | {{selfref|[text]}}
 | {{tlbare|succeeding category}} | <nowiki>{{succeeding category|(P2)}} | {{succeeding category|(P2)}}
 | {{tlbare|technical reasons}} | <nowiki>{{technical reasons|(term)|[text]|(P1)}} | {{technical reasons|(term)|[text]|(P1)}}
 | {{tlbare|this user talk}} | <nowiki>{{this user talk|(topic)|(P1)}} | {{this user talk|(topic)|(P1)}}
}}<!--(end Aligned table)-->
{{End hidden section}}

Notes

[edit]

These templates are used in thousands of articles; therefore, changing the syntax could break thousands of articles. If you wish to create or edit a disambiguation or redirection template, first ask yourself the following questions:

  1. Is there already a template that will do this job? Since many disambiguation and redirection templates have already been created, first check: Category:Disambiguation and redirection templates.
  2. Do I really need a new template for this? Will it likely be used on any other articles or should I just use {{Hatnote}} instead? Before creating a new template, see the template namespace guideline.
  3. If I change the parameters around on an existing template, do I know what the result will be? Will it break existing uses of the template and if so, can I fix all of the errors? Before making any changes, see Template sandbox and test cases.

See also

[edit]


Formerly at very start of page:


{{navbar |style=float:right;background:transparent;padding:0 1.0em; |text=This overview: |Hatnote templates documentation}}
{{#switch:{{{toc|}}}
 |omit |off |no |false = __NOTOC__
 | {{#if:{{{toclimit<includeonly>|</includeonly>}}} |{{TOC limit|{{{toclimit}}}}} }}
}}