Difference between revisions of "Template:Hatnote templates documentation"

From blackwiki
Jump to navigation Jump to search
test>Funandtrvl
m (→‎Variations: general fixes, removed colon after template examples, makes cut & paste easier)
m (630 revisions imported)
 
(498 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
<noinclude><center>
+
#REDIRECT [[Template:Hatnote templates]]
{| class="messagebox" style="width:80%; border:1px solid #c0c090; background:#f8eaba; margin:2px 4px 2px 4px;"
 
|- style="vertical-align:top;"
 
|align="center" style="width:60px; padding:1ex;"| [[Image:Edit-paste.svg|none|40px]]
 
| '''This is the template documentation box for all of the Otheruses templates.'''<br/><hr/>Such templates are not necessarily intended to be viewed directly. If they use [[w:Help:Variable|variable]]s, some links may appear broken. Do not replace these variables with [[w:Hard coding|hardcoded]] page names or URLs.
 
|}<br/><hr/>
 
</center>
 
</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;">{{tnavbar|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:Otheruses templates (example usage)|Otheruses templates (example usage)]].
+
{{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> . (Adaptable, but fails to standardize [[Wikipedia:hatnotes|hatnotes]]).
 
* '''<code>{{[[Template:Selfref|Selfref]]|TEXT}}</code>''' {{Selfref|TEXT}}
 
::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).
 
 
 
===Otheruses===
 
''Note: when used in the main namespace, the word "page" is replaced by "article" in the following hatnotes''.
 
 
 
{{tl|About}} is the main template for giving other uses; it redirects to {{tl|otheruses4}}.
 
 
 
* '''<code>{{[[Template:Otheruses4|otheruses4]]|USE1}}</code>''' (disambiguous) {{otheruses4|USE1}}
 
* '''<code>{{[[Template:Otheruses4|otheruses4]]|USE1|USE2}}</code>''' (disambiguous) {{otheruses4|USE1|USE2}}
 
* '''<code>{{[[Template:Otheruses4|otheruses4]]|USE1|USE2|PAGE2}}</code>''' {{otheruses4|USE1|USE2|PAGE2}}
 
* '''<code>{{[[Template:About|About]]||USE2|PAGE2|USE3|PAGE3|USE4|PAGE4|USE5|PAGE5}}</code>''' (alias and empty first parameter)
 
:{{About||USE2|PAGE2|USE3|PAGE3|USE4|PAGE4|USE5|PAGE5}}
 
* '''<code>{{[[Template:otheruses4|otheruses4]]|USE1|USE2|PAGE2|USE3|PAGE3|USE4|PAGE4|USE5|PAGE5}}</code>''' (fully specified)
 
:{{otheruses4|USE1|USE2|PAGE2|USE3|PAGE3|USE4|PAGE4|USE5|PAGE5}}
 
 
 
====Variations====
 
Serving the same purpose are the variations of {{tl|about}}. These are marginally easier to use for each individual purpose; however, because having so many different templates complicates things, it could be argued that the time saved by using them is lost by the time required to learn about them.
 
 
 
The following templates are variations of {{tl|about}}:
 
* '''<code>{{[[Template:Otheruses|otheruses]]}}</code>''' (disambiguous) {{otheruses}}
 
:Note: <code>{{tlx|about}}</code> will produce the same result.
 
* '''<code>{{[[Template:Otheruses1|otheruses1]]|USE}}</code>''' (disambiguous) {{otheruses1|USE}}
 
:Note: <code>{{tlx|about|USE}}</code> will produce the same result.
 
* '''<code>{{[[Template:Otheruses2|otheruses2]]|PAGE}}</code>''' (disambiguous) {{otheruses2|PAGE}}
 
:Note: adds "(disambiguation)" to whatever is input as the PAGE.
 
* '''<code>{{[[Template:Otheruses3|otheruses3]]|PAGE}}</code>''' {{otheruses3|PAGE}}
 
:Note: <code>{{tlx|about|{{!}}{{!}}PAGE}}</code> (with two empty parameters) will produce the same result.
 
* '''<code>{{[[Template:Otheruses5|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>{{[[Template:Otheruses6|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. (This usage cannot be recreated with {{tlx|about}}, only with {{tlx|dablink}} or {{tlx|for}})
 
* '''<code>{{[[Template:This|This]]|USE|PAGE}}</code>''' {{this|USE|PAGE}}
 
:Note: {{tlx|about|USE|{{!}}PAGE}} (with one empty parameter) will produce the same result.
 
* '''<code>{{[[Template:Otheruses-section]]}}</code>''' (disambiguous) {{Otheruses-section}}
 
:Note: same as {{tl|Otheruses4}}, except that it says "section", instead of "article" or "page" and indents only as far as {{tl|Main}} and other section quasi-hatnotes.
 
 
 
===== For (other topic) =====
 
{{tl|for}} (and {{tl|for2}}) can be used instead of {{tl|about}} to not include the first part - "This article is about USE". However, this can also simply be achieved with an empty first parameter in {{tl|about}}.<br>
 
For example, <code>{{[[Template:For|For]]|OTHER TOPIC|PAGE}}</code> becomes <code>{{[[Template:About|About]]||OTHER TOPIC|PAGE}}</code>.<br>
 
{{tl|for3}} is somewhat different, appending the word ''the'' in its mention of the second parameter, then generates a link using either the second or (if present) the third parameter as a parenthetical. {{tl|the}} is simply a rendering of {{tl|for3}} without bothering with the optional first argument.
 
 
 
* <code>{{[[Template:For|For]]}}</code> (disambiguous): {{for}}
 
* <code>{{[[Template:For|For]]|OTHER TOPIC}}</code> (disambiguous): {{for|OTHER TOPIC}}
 
* <code>{{[[Template:For|For]]|OTHER TOPIC|PAGE}}</code>: {{for|OTHER TOPIC|PAGE}}
 
* <code>{{[[Template:For|For]]|OTHER TOPIC|PAGE1|PAGE2}}</code>: {{for|OTHER TOPIC|PAGE1|PAGE2}}
 
* <code>{{[[Template:For2|For2]]|OTHER TOPIC|<nowiki>CUSTOM TEXT</nowiki>}}</code>: {{for2|OTHER TOPIC|CUSTOM TEXT}}
 
* <code>{{[[Template:For3|For3]]||DIFFERENT MEANING|}}</code>: {{for3||DIFFERENT MEANING}}
 
* <code>{{[[Template:For3|For3]]|OTHER TOPIC|DIFFERENT MEANING}}</code>: {{for3|OTHER TOPIC|DIFFERENT MEANING}}
 
* <code>{{[[Template:For3|For3]]|OTHER TOPIC|DIFFERENT MEANING|CUSTOM PARENTHETICAL}}</code>: {{for3|OTHER TOPIC|DIFFERENT MEANING|CUSTOM PARENTHETICAL}}
 
* <code>{{[[Template:The|The]]|DIFFERENT MEANING}}</code>: {{the|DIFFERENT MEANING}}
 
* <code>{{[[Template:The|The]]|DIFFERENT MEANING|CUSTOM PARENTHETICAL}}</code>: {{the|DIFFERENT MEANING|CUSTOM PARENTHETICAL}}
 
===== See also =====
 
* <code>{{[[Template:See also|See also]]|OTHER TOPIC}}</code>: {{See also|OTHER TOPIC}}
 
This can be used when OTHER TOPIC is related to that of the current article, and already contains a self-explanatory parenthetical.
 
 
 
==== Other people ====
 
* <code>{{[[Template:Otherpersons|otherpersons]]}}</code> (disambiguous): {{Otherpersons}}
 
* <code>{{[[Template:Otherpersons|otherpersons]]|USE}}</code> (disambiguous): {{Otherpersons|USE}}
 
* <code>{{[[Template:Otherpersons|otherpersons]]|USE|PAGE}}</code>: {{Otherpersons|USE|PAGE}}
 
* <code>{{[[Template:Otherpeople2|otherpeople2]]|PAGE}}</code>: {{Otherpeople2|PAGE}}
 
* <code>{{[[Template:Otherpeople3|otherpeople3]]|USE1|USE2}}</code>: {{Otherpeople3|USE1|USE2}}
 
* <code>{{[[Template:Otherpeople4|otherpeople4]]|USE1|USE2|PAGE}}</code>: {{Otherpeople4|USE1|USE2|PAGE}}
 
 
 
==== Other places ====
 
*{{tl|Otherplaces}}, analogous to {{tl|Otheruses}}
 
{{Otherplaces}}
 
*{{tl|Otherplaces2}}, analogous to {{tl|Otheruses2}}
 
{{Otherplaces2|DifferentArticleName}}
 
*{{tl|Otherplaces3}}, analogous to {{tl|Otheruses3}}
 
{{Otherplaces3|DifferentArticleName}}
 
 
 
==== 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:Otherhurricaneuses3|otherhurricaneuses3]]|USE1|USE2|MAIN}}</code>: {{Otherhurricaneuses3|USE1|USE2|MAIN}}
 
 
 
==== Otherusesof (topic) ====
 
* <code>{{[[Template:Otherusesof|otherusesof]]}} (disambiguous)</code>: {{otherusesof}}
 
* <code>{{[[Template:Otherusesof|otherusesof]]|TOPIC}}</code>: {{otherusesof|TOPIC}}
 
* <code>{{[[Template:Otherusesof|otherusesof]]|TOPIC|PAGE}}</code>: {{otherusesof|TOPIC|PAGE}}
 
 
 
=== Redirect ===
 
 
 
* <code>{{[[Template:Redirect|Redirect]]|REDIRECT}}</code> (disambiguous): {{Redirect|REDIRECT}}
 
* <code>{{[[Template:Redirect|Redirect]]|REDIRECT||PAGE}}</code>: {{Redirect|REDIRECT||PAGE}}
 
* <code>{{[[Template:Redirect|Redirect]]|REDIRECT|USE|PAGE}}</code>: {{Redirect|REDIRECT|USE|PAGE}}
 
* <code>{{[[Template:Redirect2|Redirect2]]|REDIRECT1|REDIRECT2}}</code> (disambiguous): {{Redirect2|REDIRECT1|REDIRECT2}}
 
* <code>{{[[Template:Redirect2|Redirect2]]|REDIRECT1|REDIRECT2|USE|PAGE}}</code>: {{Redirect2|REDIRECT1|REDIRECT2|USE|PAGE}}
 
* <code>{{[[Template:Redirect3|Redirect3]]|REDIRECT|TEXT}}</code>: {{Redirect3|REDIRECT|TEXT}}
 
* <code>{{[[Template:Redirect4|Redirect4]]|REDIRECT1|REDIRECT2}}</code> (disambiguous): {{Redirect4|REDIRECT1|REDIRECT2}}
 
* <code>{{[[Template:Redirect5|Redirect5]]|REDIRECT|USE1|PAGE1|USE2|PAGE2}}</code>: {{Redirect5|REDIRECT|USE1|PAGE1|USE2|PAGE2}}
 
* <code>{{[[Template:Redirect5|Redirect5]]|REDIRECT|USE1|PAGE1||PAGE2}}</code>: {{Redirect5|REDIRECT|USE1|PAGE1||PAGE2}}
 
* <code>{{[[Template:Redirect6|Redirect6]]|REDIRECT|USE1|PAGE1||}}</code>: {{Redirect6|REDIRECT|USE1|PAGE1||}}
 
* <code>{{[[Template:Redirect8|Redirect8]]|REDIRECT1|REDIRECT2}}</code>: {{Redirect8|REDIRECT1|REDIRECT2}}
 
 
 
=== "Not to be confused with"... ===
 
* <code>{{[[Template:Distinguish|Distinguish]]|PAGE}}</code>: {{Distinguish|PAGE}}
 
* <code>{{[[Template:Distinguish2|Distinguish2]]|TEXT}}</code>: {{Distinguish2|TEXT}}
 
 
 
=== 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 may be used in thousands of articles, and changing the syntax could therefore break thousands of articles.  If you wish to edit a disambiguation template first ask yourself:
 
# Is there already another template that will do this job?  We have lots of disambiguation templates already, see [[:Category:Disambiguation and redirection templates]].
 
# Do I really need a template for this?  Will it ever get used on any other articles, or should I just use {{tl|dablink}} instead?
 
# Do I know what will happen if I change the parameters around?  Will it break existing uses of the template, and if so, can I fix them all?
 
<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