Difference between revisions of "Template:Hatnote templates documentation"

From blackwiki
Jump to navigation Jump to search
(according to the documentation (its own documentation) it is to be used at the top of sections, not at the top of articles. Thus, this is not a hatnote.)
m (630 revisions imported)
 
(412 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
<noinclude>{{ombox
+
#REDIRECT [[Template:Hatnote templates]]
|image=[[Image:Edit-paste.svg|40px]]
 
|style=background:#f9f9b7;
 
|text='''This is a [[Wikipedia:Template documentation|template documentation]] page.'''<br><small>This page may not be intended to be viewed directly.<br>Links using [[Help:Variable|variable]]s may appear broken; do not replace these with [[hardcoded]] page names or URLs.</small>
 
}}</noinclude><!--
 
----
 
Note this page is apparently included by a whole list of /doc pages, So this should work through and tag them all properly, assuming they are formatted the same ways.
 
----
 
---><div style="float: right; padding: 0 1em;">{{navbar|otheruses templates}}</div>
 
==Otheruses templates==
 
To discuss these templates as a whole, please see: [[Wikipedia talk:Disambiguation|Disambiguation (talk)]]. If you wish to discuss general wordings, rather than the wording or formatting of this specific template, don't post here or else what you say will probably go unnoticed.
 
  
For a summary page on how to use these templates, see [[Wikipedia:HATTEST|the example page here]].
+
{{Rcat shell|h=See also {{tl|Hatnote templates/doc}}.|
 
+
{{R from merge|Wikipedia:Hatnote#Hatnote templates}}
===Generic===
+
}}
* '''<code>{{[[Template:Dablink|Dablink]]|TEXT}}</code>''' {{dablink|TEXT}}
 
:''For example'': <code><nowiki>{{dablink|For other senses of this term, see [[etc...]]}}</nowiki></code> . (Note: adaptable, but fails to standardize [[Wikipedia:hatnotes|hatnotes]]).
 
* '''<code>{{[[Template:Selfref|Selfref]]|TEXT}}</code>''' {{Selfref|TEXT}}
 
:Note: similar in usage to the [[Template:Dablink|Dablink]] template, but used for hatnotes that don't make sense on mirrors of Wikipedia, such as linking an article from the main namespace to the Wikipedia namespace. (See: [[Wikipedia:Avoid self-references|Avoid self-references]] for more details).
 
 
 
===Other Uses===
 
====About====
 
{{tl|about}} is the main template for noting other uses.
 
 
 
''Note. When used in [[Wikipedia:Main namespace|main namespace]], the word "page" in the following hatnotes is replaced by "article".''
 
 
 
* '''<code><nowiki>{{about|USE1}}</nowiki></code>'''
 
{{about|USE1}}
 
* '''<code><nowiki>{{about|USE1||PAGE2}}</nowiki></code>''' (When the disambiguation page has a different name — '''Note the empty second parameter''')
 
{{about|USE1||PAGE2}}
 
* '''<code><nowiki>{{about|USE1|USE2|PAGE2}}</nowiki></code>''' (When there is only one other use)
 
{{about|USE1|USE2|PAGE2}}
 
* '''<code><nowiki>{{about|USE1|USE2|PAGE2|and|PAGE3}}</nowiki></code>''' (Two pages for USE2)
 
{{about|USE1|USE2|PAGE2|and|PAGE3}}
 
* '''<code><nowiki>{{about|USE1|USE2|PAGE2|USE3|PAGE3|USE4|PAGE4|USE5|PAGE5}}</nowiki></code>''' (When there are up to five other uses — You should generally create a [[Wikipedia:Disambiguation|disambiguation page]] at this point)
 
{{about|USE1|USE2|PAGE2|USE3|PAGE3|USE4|PAGE4|USE5|PAGE5}}
 
* '''<code><nowiki>{{about|USE1|USE2|PAGE2|USE3|PAGE3|other uses}}</nowiki></code>''' (When there are several standard other uses and also a disambiguation page with default name — '''Note that the last page name is not specified''')
 
{{about|USE1|USE2|PAGE2|USE3|PAGE3|other uses}}
 
* '''<code><nowiki>{{about|USE1|USE2|PAGE2|USE3|PAGE3|other uses|PAGE4}}</nowiki></code>''' (When there are several standard other uses and also a disambiguation page with non-default name)
 
{{about|USE1|USE2|PAGE2|USE3|PAGE3|other uses|PAGE4}}
 
* '''<code><nowiki>{{about|USE1|USE2|PAGE2|USE3|PAGE3|other uses|PAGE4|and}}</nowiki></code>'''
 
{{about|USE1|USE2|PAGE2|USE3|PAGE3|other uses|PAGE4|and}}
 
* '''<code><nowiki>{{about||USE2|PAGE2|USE3|PAGE3|other uses}}</nowiki></code>''' (When you don't need to state the focus of this article/page — '''Note the empty first parameter''')
 
{{about||USE2|PAGE2|USE3|PAGE3|other uses}}
 
 
 
====Otheruses====
 
When such a wordy hatnote as {{tl|about}} is not needed, {{tl|otheruses}} is often useful.
 
 
 
* '''<code>{{tlp|otheruses}}</code>''' (disambiguous)
 
{{otheruses}}
 
* '''<code>{{tlp|otheruses|PAGE1}}</code>'''
 
{{otheruses|PAGE1}}
 
 
 
=====Variations=====
 
There are, historically, a whole family of "other uses" templates for specific cases. <nowiki>{{otheruses4}}</nowiki> has been generalized and merged with {{tl|about}} to form the standard hatnote for "other uses" and many of the others can be specified using the {{tl|about}} template. However, the individual templates may be easier to use in certain contexts.
 
 
 
Here are the variations and (when appropriate) the equivalents using the {{tl|about}} {{tl|otheruses}} or {{tl|for}} templates.
 
* '''<code>{{tlp|otheruses2|PAGE1}}</code>''' (disambiguous) {{otheruses2|PAGE1}}
 
:Note: adds "(disambiguation)" to whatever is input as the PAGE1.
 
:Note: <code>{{tlp|otheruses|PAGE1 (disambiguation)}}</code> produces the same result.
 
* '''<code>{{tlp|otheruses5}}</code>''' (disambiguous) {{otheruses5}}
 
:Note: use when there is both a singular and plural disambiguation page. (Only works when the plural is formed by simply adding a "s" at the end)
 
* '''<code>{{tlp|otheruses6|PAGE1|PAGE2}}</code>''' {{otheruses6|PAGE1|PAGE2}}
 
:Note: use when there are two disambiguation pages, such as a noun and an adjective or a singular and irregular plural. There are only two parameters, at least one parameter is required.
 
:Note: <code>{{tlp|for||PAGE1|PAGE2}}</code> and <code>{{tlp|about|||PAGE1|and|PAGE2}}</code> produce the same result.
 
* '''<code>{{tlp|otheruses-section|USE}}</code>''' (disambiguous) {{otheruses-section|USE}}
 
:Note: same as {{tl|about}}, except that it says "section", instead of "article" or "page".
 
 
 
====For====
 
{{tl|for}} can be used instead of {{tl|about}} so as not to display: ''This page is about USE1.'' but still specify as specific other use. This effect can also be achieved by using an empty first parameter in {{tl|about}} as in:
 
 
 
:''For example'': <code>{{tlp|for|OTHER TOPIC|PAGE1}}</code> is the same as <code>{{tlp|about||OTHER TOPIC|PAGE1}}</code> (note empty first parameter).<br>
 
 
 
However, it is somewhat more clear when using the {{tl|for}} template, since the word "about" does not appear in the statement.
 
 
 
* '''<code>{{tlp|for|OTHER TOPIC}}</code>''' (disambiguous) {{for|OTHER TOPIC}}
 
* '''<code>{{tlp|for|OTHER TOPIC|PAGE1}}</code>''' {{for|OTHER TOPIC|PAGE1}}
 
* '''<code>{{tlp|for|OTHER TOPIC|PAGE1|PAGE2}}</code>''' {{for|OTHER TOPIC|PAGE1|PAGE2}}
 
* '''<code>{{tlp|for||PAGE1|PAGE2}}</code>''' {{for||PAGE1|PAGE2}}
 
 
 
=====Variations=====
 
As with {{tl|otheruses}}, there are a whole family of "for" templates. For example {{tl|for3}} appends the word ''the'' in its mention of the second parameter, then generating a link, using either the second or (if present) the third parameter, as a parenthetical. Additionally, {{tl|the}} is simply a rendering of {{tl|for3}}, without bothering with the optional first argument.
 
 
 
* '''<code>{{tlp|for2|OTHER TOPIC|CUSTOM TEXT}}</code>''' {{for2|OTHER TOPIC|CUSTOM TEXT}}
 
* '''<code>{{tlp|for3||DIFFERENT MEANING}}</code>''' {{for3||DIFFERENT MEANING}}
 
* '''<code>{{tlp|for3|OTHER TOPIC|DIFFERENT MEANING}}</code>''' {{for3|OTHER TOPIC|DIFFERENT MEANING}}
 
* '''<code>{{tlp|for3|OTHER TOPIC|DIFFERENT MEANING|CUSTOM PARENTHETICAL}}</code>''' {{for3|OTHER TOPIC|DIFFERENT MEANING|CUSTOM PARENTHETICAL}}
 
* '''<code>{{tlp|the|DIFFERENT MEANING}}</code>''' {{the|DIFFERENT MEANING}}
 
* '''<code>{{tlp|the|DIFFERENT MEANING|CUSTOM PARENTHETICAL}}</code>''' {{the|DIFFERENT MEANING|CUSTOM PARENTHETICAL}}
 
 
 
====Other people====
 
* '''<code>{{[[Template:Otherpersons|otherpersons]]}}</code>''' (disambiguous) {{otherpersons}}
 
* '''<code>{{[[Template:Otherpersons|otherpersons]]|NAME}}</code>''' (disambiguous) {{otherpersons|NAME}}
 
* '''<code>{{[[Template:Otherpersons|otherpersons]]|NAME|PAGE}}</code>''' {{otherpersons|NAME|PAGE}}
 
* '''<code>{{[[Template:Otherpersons3|otherpersons3]]|NAME|PAGE|named=titled}}</code>''' {{otherpersons3|NAME|PAGE|named=titled}}
 
:Note: defaults to "named" as in {{tl|otherpersons}}, exists for options like "nicknamed", "known as", etc.
 
* '''<code>{{[[Template:Otherpeople2|otherpeople2]]|PAGE}}</code>''' {{otherpeople2|PAGE}}
 
* '''<code>{{[[Template:Otherpeople3|otherpeople3]]}}</code>''' (disambiguous) {{otherpeople3}}
 
:Note: same as {{tl|otherpersons}} except uses "people" instead of "persons"
 
* '''<code>{{[[Template:Otherpeople3|otherpeople3]]|PERSON1}}</code>''' (disambiguous) {{otherpeople3|PERSON1}}
 
* '''<code>{{[[Template:Otherpeople3|otherpeople3]]|PERSON1|PERSON2}}</code>''' (disambiguous) {{otherpeople3|PERSON1|PERSON2}}
 
* '''<code>{{[[Template:Otherpeople3|otherpeople3]]|PERSON1|PERSON2|PAGE2}}</code>''' {{otherpeople3|PERSON1|PERSON2|PAGE2}}
 
* '''<code>{{[[Template:Otherpeople3|otherpeople3]]|PERSON1||PAGE2}}</code>''' {{otherpeople3|PERSON1||PAGE2}}
 
 
 
====Other places====
 
* '''<code>{{tlp|otherplaces}}</code>''', analogous to '''<code>{{tl|otheruses}}</code>''' (disambiguous)
 
{{otherplaces}}
 
* '''<code>{{tlp|otherplaces|PAGE}}</code>''', analogous to '''<code>{{tl|otheruses2}}</code>''' (disambiguous)
 
{{otherplaces|PAGE}}
 
* '''<code>{{tlp|otherplaces3|PAGE}}</code>''', analogous to '''<code>{{tl|otheruses}}</code>'''
 
{{otherplaces3|PAGE}}
 
 
 
==== Otherhurricaneuses ====
 
For articles on [[storm]]s:
 
* '''<code>{{[[Template:Otherhurricaneuses|otherhurricaneuses]]}}</code>''' (disambiguous) {{Otherhurricaneuses}}
 
* '''<code>{{[[Template:Otherhurricaneuses|otherhurricaneuses]]|DISAMBIG}}</code>''' {{Otherhurricaneuses|DISAMBIG}}
 
* '''<code>{{[[Template:Otherhurricaneuses|otherhurricaneuses]]|DISAMBIG|THIS}}</code>''' {{Otherhurricaneuses|DISAMBIG|THIS}}
 
* '''<code>{{[[Template:Otherhurricaneuses|otherhurricaneuses]]||THIS}}</code>''' {{Otherhurricaneuses||THIS}}
 
 
 
====Otherusesof (topic)====
 
* '''<code>{{[[Template:Otherusesof|otherusesof]]}}</code>''' (disambiguous) {{otherusesof}}
 
* '''<code>{{[[Template:Otherusesof|otherusesof]]|TOPIC}}</code>''' (disambiguous) {{otherusesof|TOPIC}}
 
* '''<code>{{[[Template:Otherusesof|otherusesof]]|TOPIC|PAGE1}}</code>''' {{otherusesof|TOPIC|PAGE1}}
 
 
 
===Redirect===
 
* '''<code>{{[[Template:Redirect|Redirect]]|REDIRECT}}</code>''' (disambiguous)
 
{{Redirect|REDIRECT}}
 
* '''<code>{{[[Template:Redirect|Redirect]]|REDIRECT||PAGE1}}</code>'''
 
{{Redirect|REDIRECT||PAGE1}}
 
* '''<code>{{[[Template:Redirect|Redirect]]|REDIRECT|USE1|PAGE1}}</code>'''
 
{{Redirect|REDIRECT|USE1|PAGE1}}
 
* '''<code>{{[[Template:Redirect|Redirect]]|REDIRECT|USE1|PAGE1|USE2|PAGE2}}</code>'''
 
{{Redirect|REDIRECT|USE1|PAGE1|USE2|PAGE2}}
 
* '''<code>{{[[Template:Redirect|Redirect]]|REDIRECT|USE1|PAGE1|USE2|PAGE2|USE3|PAGE3}}</code>'''
 
{{Redirect|REDIRECT|USE1|PAGE1|USE2|PAGE2|USE3|PAGE3}}
 
* '''<code>{{[[Template:Redirect|Redirect]]|REDIRECT|USE1|PAGE1|and|PAGE2}}</code>'''
 
{{Redirect|REDIRECT|USE1|PAGE1|and|PAGE2}}
 
* '''<code>{{[[Template:Redirect|Redirect]]|REDIRECT|USE1|PAGE1|USE2|PAGE2|and|PAGE3}}</code>'''
 
{{Redirect|REDIRECT|USE1|PAGE1|USE2|PAGE2|and|PAGE3}}
 
 
 
====Variations====
 
*'''<code>{{tlp|Redirect-acronym|TERM|PAGE}}</code>'''
 
{{Redirect-acronym|TERM|PAGE}}
 
* '''<code>{{[[Template:Redirect2|Redirect2]]|REDIRECT1|REDIRECT2}}</code>''' (disambiguous)
 
{{Redirect2|REDIRECT1|REDIRECT2}}
 
* '''<code>{{[[Template:Redirect2|Redirect2]]|REDIRECT1|REDIRECT2|USE|PAGE1}}</code>'''
 
{{Redirect2|REDIRECT1|REDIRECT2|USE|PAGE1}}
 
* '''<code>{{[[Template:Redirect2|Redirect2]]|REDIRECT1|REDIRECT2|USE1|PAGE1|USE2|PAGE2}}</code>'''
 
{{Redirect2|REDIRECT1|REDIRECT2|USE1|PAGE1|USE2|PAGE2}}
 
* '''<code>{{[[Template:Redirect3|Redirect3]]|REDIRECT|TEXT}}</code>'''
 
{{Redirect3|REDIRECT|TEXT}}
 
* '''<code>{{[[Template:Redirect4|Redirect4]]|REDIRECT1|REDIRECT2}}</code>''' (disambiguous)
 
{{Redirect4|REDIRECT1|REDIRECT2}}
 
* '''<code>{{[[Template:Redirect6|Redirect6]]|REDIRECT|USE1|PAGE1}}</code>''' (disambiguous)
 
{{Redirect6|REDIRECT|USE1|PAGE1}}
 
* '''<code>{{[[Template:Redirect7|Redirect7]]|"REDIRECT1", "REDIRECT2", and "REDIRECT3"|USE1|PAGE1|USE2|PAGE2}}</code>'''
 
{{Redirect7|"REDIRECT1", "REDIRECT2", and "REDIRECT3"|USE1|PAGE1|USE2|PAGE2}}
 
:Note: If the number of pages redirecting to the target page is two, {{tlp|Redirect2}} can be used instead. If the number is three and there are three corresponding disambiguation pages, {{tlp|Redirect10}} can be used.
 
* '''<code>{{[[Template:Redirect10|Redirect10]]|REDIRECT1|REDIRECT2|REDIRECT3}}</code>''' (disambiguous)
 
{{Redirect10|REDIRECT1|REDIRECT2|REDIRECT3}}
 
* '''<code>{{[[Template:Redirect-distinguish|Redirect-distinguish]]|REDIRECT|PAGE}}</code>'''
 
{{Redirect-distinguish|REDIRECT|PAGE}}
 
 
 
===Homonyms and homophones: "Not to be confused with..."===
 
* '''<code>{{[[Template:Distinguish|Distinguish]]|PAGE1}}</code>''' {{Distinguish|PAGE1}}
 
* '''<code>{{[[Template:Distinguish2|Distinguish2]]|TEXT}}</code>''' {{Distinguish2|TEXT}}
 
* '''<code>{{[[Template:Redirect-distinguish|Redirect-distinguish]]|REDIRECT|PAGE}}</code>''' {{Redirect-distinguish|REDIRECT|PAGE}}
 
 
 
===Notes===
 
'''Do not use [[Wikipedia:Template substitution|subst:]] with these templates''', as that will prevent:
 
# propagating changes as the template is modified; and the
 
# ''[[Special:Whatlinkshere/{{NAMESPACE}}:{{PAGENAME}}|What links here]]'' (WLH) listing.
 
 
 
'''Please do not edit these templates, unless you know what you are doing.'''
 
 
 
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:
 
# Is there another template already, that will do this job? Since many disambiguation and redirection templates have already been created, first check: [[:Category:Disambiguation and redirection templates]].
 
# Do I really need a new template for this? Will it likely be used on any other articles or should I just use {{tl|dablink}} instead? Before creating a new template, see: [[Wikipedia:Template namespace|Template namespace]] guideline.
 
# 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: [[Wikipedia:Template test cases|Template test cases]].
 
 
 
<div style="text-align: right"><small>(This box appears in [[Special:Whatlinkshere/Template:Otheruses templates|several articles in Template talk and Wikipedia namespaces]].)</small></div><includeonly></includeonly><noinclude>
 
{{Documentation}}
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS -->
 
</noinclude>
 

Latest revision as of 16:24, 6 September 2020