Difference between revisions of "Template:Hatnote templates documentation"
test>Metamorf (→Variations: Improper use of {{otheruses7}} template) |
|||
| Line 48: | Line 48: | ||
* '''<code>{{[[Template:Otheruses6|otheruses6]]|PAGE1|PAGE2}}</code>''' {{otheruses6|PAGE1|PAGE2}} | * '''<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}}) | :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:Otheruses7|otheruses7]]|USE1|PAGE1|USE2|PAGE2 | + | * '''<code>{{[[Template:Otheruses7|otheruses7]]|USE1|PAGE1|USE2|PAGE2}}</code>''' {{otheruses7|USE1|PAGE1|USE2|PAGE2}} |
:Note: {{tlx|otheruses4}} with an empty first parameter will produce the same result. | :Note: {{tlx|otheruses4}} with an empty first parameter will produce the same result. | ||
* '''<code> {{[[Template:Otheruses8|otheruses8]]|USE1|PAGE2|PAGE3}}</code>''' {{otheruses8|USE1|PAGE2|PAGE3}} | * '''<code> {{[[Template:Otheruses8|otheruses8]]|USE1|PAGE2|PAGE3}}</code>''' {{otheruses8|USE1|PAGE2|PAGE3}} | ||
Revision as of 13:21, 13 August 2009
| This is a template documentation page. This page may not be intended to be viewed directly. Links using variables may appear broken; do not replace these with hardcoded page names or URLs. |
Contents
Otheruses templates
To discuss these templates as a whole, please see: 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: Otheruses templates (example usage).
Generic
{{Dablink|TEXT}}
- For example:
{{dablink|For other senses of this term, see [[etc...]]}}. (Note: adaptable, but fails to standardize hatnotes).
{{Selfref|TEXT}}
- Note: similar in usage to the 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: 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.
{{About}} is the main template for giving other uses; however, it now redirects to {{otheruses4}}.
{{otheruses4|USE1}}(disambiguous) Template:Otheruses4{{otheruses4|USE1|USE2}}(disambiguous) Template:Otheruses4{{otheruses4|USE1|USE2|PAGE2}}Template:Otheruses4{{otheruses4||USE2|PAGE2|USE3|PAGE3|USE4|PAGE4|USE5|PAGE5}}(note empty first parameter and does not display: This page is about USE1.)
- Script error: No such module "about".
{{otheruses4|USE1|USE2|PAGE2|USE3|PAGE3|USE4|PAGE4|USE5|PAGE5}}(fully specified)
Variations
Serving the same purpose are the variations of {{otheruses4}}, or the redirect {{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 {{otheruses4}}, or the redirect {{about}}:
{{otheruses}}(disambiguous) Template:Otheruses
- Note:
will produce the same result.{{about}}
{{otheruses1|USE}}(disambiguous) Template:Otheruses1
- Note:
will produce the same result.{{about|USE}}
{{otheruses2|PAGE}}(disambiguous) Template:Otheruses2
- Note: adds "(disambiguation)" to whatever is input as the PAGE.
{{otheruses3|PAGE}}Template:Otheruses3
- Note:
(with two empty parameters) will produce the same result.{{about|||PAGE}}
{{otheruses5}}(disambiguous) Template: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)
{{otheruses6|PAGE1|PAGE2}}Template:Otheruses6
- 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
{{about}}, only with{{dablink}}or{{for}})
{{otheruses7|USE1|PAGE1|USE2|PAGE2}}Template:Otheruses7
- Note:
{{otheruses4}}with an empty first parameter will produce the same result.
{{otheruses8|USE1|PAGE2|PAGE3}}Template:Otheruses8{{This|USE|PAGE}}Template:This
- Note:
{{about|USE||PAGE}}(with one empty parameter) will produce the same result.
{{Template:Otheruses-section}}(disambiguous) Template:Otheruses-section
- Note: same as {{Otheruses4}}, except that it says "section", instead of "article" or "page" and indents only as far as {{Main}} and other section quasi-hatnotes.
For (other topic)
Both {{for}} (and {{for2}}) can be used, instead of {{otheruses4}} or the redirect {{about}}, to not display: This page is about USE1. This effect can also be achieved by using an empty first parameter in {{otheruses4}} or the redirect {{about}}.
- For example:
{{For|OTHER TOPIC|PAGE}}is the same as{{otheruses4||OTHER TOPIC|PAGE}}(note empty first parameter).
Also, {{for3}} is somewhat different, appending 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, {{the}} is simply a rendering of {{for3}}, without bothering with the optional first argument.
{{For}}(disambiguous) Error: no context parameter provided. Use {{other uses}} for "other uses" hatnotes. (help).{{For|OTHER TOPIC}}(disambiguous){{For|OTHER TOPIC|PAGE}}{{For|OTHER TOPIC|PAGE1|PAGE2}}{{For2|OTHER TOPIC|CUSTOM TEXT}}{{For3||DIFFERENT MEANING|}}Template:For3{{For3|OTHER TOPIC|DIFFERENT MEANING}}Template:For3{{For3|OTHER TOPIC|DIFFERENT MEANING|CUSTOM PARENTHETICAL}}Template:For3{{The|DIFFERENT MEANING}}Template:The{{The|DIFFERENT MEANING|CUSTOM PARENTHETICAL}}Template:The
See also
{{See also|OTHER TOPIC}}
- Note: use when OTHER TOPIC is related to that of the current article and already contains a self-explanatory parenthetical.
Other people
{{otherpersons}}(disambiguous) Template:Otherpersons{{otherpersons|USE}}(disambiguous) Template:Otherpersons{{otherpersons|USE|PAGE}}Template:Otherpersons{{otherpeople2|PAGE}}Template:Otherpeople2{{otherpeople3|USE1|USE2}}(disambiguous) Template:Otherpeople3{{otherpeople4|USE1|USE2|PAGE}}Template:Otherpeople4
Other places
{{Otherplaces}}, analogous to{{Otheruses}}(disambiguous)
{{Otherplaces2}}, analogous to{{Otheruses2}}(disambiguous)
{{Otherplaces3}}, analogous to{{Otheruses3}}
Otherhurricaneuses
For articles on storms:
{{otherhurricaneuses}}(disambiguous) Template:Otherhurricaneuses{{otherhurricaneuses|DISAMBIG}}Template:Otherhurricaneuses{{otherhurricaneuses|DISAMBIG|THIS}}Template:Otherhurricaneuses{{otherhurricaneuses3|USE1|USE2|MAIN}}(disambiguous) Template:Otherhurricaneuses3
Otherusesof (topic)
{{otherusesof}}(disambiguous) Template:Otherusesof{{otherusesof|TOPIC}}(disambiguous) Template:Otherusesof{{otherusesof|TOPIC|PAGE}}Template:Otherusesof
Redirect
{{Redirect|REDIRECT}}(disambiguous){{Redirect|REDIRECT||PAGE}}{{Redirect|REDIRECT|USE|PAGE}}{{Redirect2|REDIRECT1|REDIRECT2}}(disambiguous){{Redirect2|REDIRECT1|REDIRECT2|USE|PAGE}}{{Redirect3|REDIRECT|TEXT}}{{Redirect4|REDIRECT1|REDIRECT2}}(disambiguous) Template:Redirect4{{Redirect5|REDIRECT|USE1|PAGE1|USE2|PAGE2}}Template:Redirect5{{Redirect5|REDIRECT|USE1|PAGE1||PAGE2}}Template:Redirect5{{Redirect6|REDIRECT|USE1|PAGE1||}}(disambiguous) Template:Redirect6{{Redirect8|REDIRECT1|REDIRECT2}}{{Redirect8|REDIRECT1|REDIRECT2|USE1|PAGE1|USE2|PAGE2}}{{Redirect10|REDIRECT1|REDIRECT2|REDIRECT3}}(disambiguous) Template:Redirect10
"Not to be confused with..."
{{Distinguish|PAGE}}{{Distinguish2|TEXT}}Template:Distinguish2
Notes
Do not use subst: with these templates, as that will prevent:
- propagating changes as the template is modified; and the
- 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 {{dablink}} instead? Before creating a new template, see: 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: Template test cases.
Initial visibility: currently defaults to autocollapse
To set this template's initial visibility, the |state= parameter may be used:
|state=collapsed:{{Hatnote templates documentation|state=collapsed}}to show the template collapsed, i.e., hidden apart from its title bar|state=expanded:{{Hatnote templates documentation|state=expanded}}to show the template expanded, i.e., fully visible|state=autocollapse:{{Hatnote templates documentation|state=autocollapse}}
If the |state= parameter in the template on this page is not set, the template's initial visibility is taken from the |default= parameter in the Collapsible option template. For the template on this page, that currently evaluates to autocollapse.
TemplateData for VisualEditor
No description.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| State | state | no description | Unknown | optional |
See also
| The above documentation is transcluded from Template:Hatnote templates documentation/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |