Difference between revisions of "Module:Hatnote templates documentation"
| Line 11: | Line 11: | ||
===Other uses=== | ===Other uses=== | ||
| − | ===="This page is about | + | ===="This page is about … For other uses …"==== |
{{tl|About}} is the main template for noting other uses. | {{tl|About}} is the main template for noting other uses. | ||
| Line 31: | Line 31: | ||
:Note: this hatnote says "section", instead of "article" or "page". | :Note: this hatnote says "section", instead of "article" or "page". | ||
| − | ===="For other uses, see | + | ===="For other uses, see …"==== |
When such a wordy hatnote as {{tl|About}} is not needed, {{tl|Other uses}} is often useful. | When such a wordy hatnote as {{tl|About}} is not needed, {{tl|Other uses}} is often useful. | ||
| Line 52: | Line 52: | ||
* {{tlx|Three other uses|USE1|USE2|PAGE2|USE3|PAGE3|USE4|PAGE4}} → {{Three other uses|USE1|USE2|PAGE2|USE3|PAGE3|USE4|PAGE4}} | * {{tlx|Three other uses|USE1|USE2|PAGE2|USE3|PAGE3|USE4|PAGE4}} → {{Three other uses|USE1|USE2|PAGE2|USE3|PAGE3|USE4|PAGE4}} | ||
| − | ===="For | + | ===="For …, see …"==== |
{{tl|For}} can be used instead of {{tl|About}} so as not to display: ''This page is about USE1.'' but still specify a specific other use. This effect can also be achieved by using an empty first parameter in {{tl|About}} as in: | {{tl|For}} can be used instead of {{tl|About}} so as not to display: ''This page is about USE1.'' but still specify a specific other use. This effect can also be achieved by using an empty first parameter in {{tl|About}} as in: | ||
| Line 71: | Line 71: | ||
* {{tlx|For example|Pagename|Piped link name}} → {{For example|Pagename|Piped link name}} | * {{tlx|For example|Pagename|Piped link name}} → {{For example|Pagename|Piped link name}} | ||
| − | ===="For other uses of | + | ===="For other uses of …, see …" ==== |
* {{tlx|Other uses of}} (disambiguous) → {{Other uses of}} | * {{tlx|Other uses of}} (disambiguous) → {{Other uses of}} | ||
* {{tlx|Other uses of|TOPIC}} (disambiguous) → {{Other uses of|TOPIC}} | * {{tlx|Other uses of|TOPIC}} (disambiguous) → {{Other uses of|TOPIC}} | ||
* {{tlx|Other uses of|TOPIC|PAGE1}} → {{Other uses of|TOPIC|PAGE1}} | * {{tlx|Other uses of|TOPIC|PAGE1}} → {{Other uses of|TOPIC|PAGE1}} | ||
| − | ===="For more details on | + | ===="For more details on …, see …"==== |
{{tlx|Details}} is used to make [[wikipedia:summary style|summary style]] explicit. To be used in a section for which there is also a separate article on the subject. | {{tlx|Details}} is used to make [[wikipedia:summary style|summary style]] explicit. To be used in a section for which there is also a separate article on the subject. | ||
* {{tlx|Details|Article|TOPIC}} → {{Details|Article|TOPIC}} | * {{tlx|Details|Article|TOPIC}} → {{Details|Article|TOPIC}} | ||
| Line 83: | Line 83: | ||
* {{tlx|Details3|<nowiki>[[article 1]], [[article 2]], and [[article 3]]</nowiki>|TOPIC}} → {{Details3|[[article 1]], [[article 2]], and [[article 3]]|TOPIC}} | * {{tlx|Details3|<nowiki>[[article 1]], [[article 2]], and [[article 3]]</nowiki>|TOPIC}} → {{Details3|[[article 1]], [[article 2]], and [[article 3]]|TOPIC}} | ||
| − | ===="Further information: | + | ===="Further information: …"==== |
* {{tlx|See|OTHER TOPIC}} → {{see|OTHER TOPIC}} | * {{tlx|See|OTHER TOPIC}} → {{see|OTHER TOPIC}} | ||
| Line 92: | Line 92: | ||
This template takes a single parameter of any length. | This template takes a single parameter of any length. | ||
| − | ===="See also | + | ===="See also …"==== |
* {{tlx|See also|OTHER TOPIC}} → {{See also|OTHER TOPIC}} | * {{tlx|See also|OTHER TOPIC}} → {{See also|OTHER TOPIC}} | ||
:Note: use when OTHER TOPIC is related to that of the current article and already contains a self-explanatory parenthetical. | :Note: use when OTHER TOPIC is related to that of the current article and already contains a self-explanatory parenthetical. | ||
| Line 98: | Line 98: | ||
* {{tlx|See also2|[[OTHER TOPIC]]|[[OTHER TOPIC2]]|[[OTHER TOPIC3]] and other text}} → {{See also2|[[OTHER TOPIC]]|[[OTHER TOPIC2]]|[[OTHER TOPIC3]] and other text}} | * {{tlx|See also2|[[OTHER TOPIC]]|[[OTHER TOPIC2]]|[[OTHER TOPIC3]] and other text}} → {{See also2|[[OTHER TOPIC]]|[[OTHER TOPIC2]]|[[OTHER TOPIC3]] and other text}} | ||
| − | ====" | + | ===="… redirects here. For other uses, see …"==== |
* {{tlx|Redirect|REDIRECT}} (disambiguous) → {{Redirect|REDIRECT}} | * {{tlx|Redirect|REDIRECT}} (disambiguous) → {{Redirect|REDIRECT}} | ||
* {{tlx|Redirect|REDIRECT<nowiki>||</nowiki>PAGE1}} → {{Redirect|REDIRECT||PAGE1}} | * {{tlx|Redirect|REDIRECT<nowiki>||</nowiki>PAGE1}} → {{Redirect|REDIRECT||PAGE1}} | ||
| Line 152: | Line 152: | ||
===Distinguish=== | ===Distinguish=== | ||
| − | ===="Not to be confused with | + | ===="Not to be confused with …"==== |
* {{tlx|Distinguish|PAGE1}} → {{Distinguish|PAGE1}} | * {{tlx|Distinguish|PAGE1}} → {{Distinguish|PAGE1}} | ||
* {{tlx|Distinguish|PAGE1|PAGE2|PAGE3|PAGE4}} → {{Distinguish|PAGE1|PAGE2|PAGE3|PAGE4}} | * {{tlx|Distinguish|PAGE1|PAGE2|PAGE3|PAGE4}} → {{Distinguish|PAGE1|PAGE2|PAGE3|PAGE4}} | ||
* {{tlx|Distinguish2|TEXT}} → {{Distinguish2|TEXT}} | * {{tlx|Distinguish2|TEXT}} → {{Distinguish2|TEXT}} | ||
| − | ====" | + | ===="… redirects here. It is not to be confused with …"==== |
* {{tlx|Redirect-distinguish|REDIRECT|PAGE1}} → {{Redirect-distinguish|REDIRECT|PAGE1}} | * {{tlx|Redirect-distinguish|REDIRECT|PAGE1}} → {{Redirect-distinguish|REDIRECT|PAGE1}} | ||
* {{tlx|Redirect-distinguish|REDIRECT|PAGE1|PAGE2|PAGE3|PAGE4}} → {{Redirect-distinguish|REDIRECT|PAGE1|PAGE2|PAGE3|PAGE4}} | * {{tlx|Redirect-distinguish|REDIRECT|PAGE1|PAGE2|PAGE3|PAGE4}} → {{Redirect-distinguish|REDIRECT|PAGE1|PAGE2|PAGE3|PAGE4}} | ||
* {{tlx|Redirect-distinguish2|REDIRECT|TEXT}} → {{Redirect-distinguish2|REDIRECT|TEXT}} | * {{tlx|Redirect-distinguish2|REDIRECT|TEXT}} → {{Redirect-distinguish2|REDIRECT|TEXT}} | ||
| − | ====" | + | ===="… is a common misspelling of …==== |
* {{tlx|Misspelling|PAGE2}} → {{Misspelling|PAGE2}} | * {{tlx|Misspelling|PAGE2}} → {{Misspelling|PAGE2}} | ||
| − | ==="Main article: | + | ==="Main article: …" and more=== |
* {{tlx|Main|Main Article}} → {{Main|Main Article}} | * {{tlx|Main|Main Article}} → {{Main|Main Article}} | ||
* {{tlx|Main|Main Article|Article2}} → {{Main|Main Article|Article2}} | * {{tlx|Main|Main Article|Article2}} → {{Main|Main Article|Article2}} | ||
Revision as of 00:11, 18 March 2011
Contents
- 1 Hatnote templates
- 1.1 Generic
- 1.2 Other uses
- 1.2.1 "This page is about … For other uses …"
- 1.2.2 "For other uses, see …"
- 1.2.3 "For …, see …"
- 1.2.4 "For other uses of …, see …"
- 1.2.5 "For more details on …, see …"
- 1.2.6 "Further information: …"
- 1.2.7 "See also …"
- 1.2.8 "… redirects here. For other uses, see …"
- 1.2.9 Other people
- 1.2.10 Other places
- 1.2.11 Other hurricanes
- 1.2.12 Other ships
- 1.3 Distinguish
- 1.4 "Main article: …" and more
- 1.5 Wikipedia self-reference
- 1.6 Categories
- 1.7 Notes
- 1.8 See also
- 2 TemplateData for VisualEditor
- 3 See also
Hatnote templates
For a summary page on how to use these templates, see the example page here. For the full editing guideline on hatnotes, see Wikipedia:Hatnote.
Generic
{{Dablink|TEXT}}→
{{Rellink|TEXT}}→ Template:Rellink
Other uses
"This page is about … For other uses …"
{{About}} is the main template for noting other uses.
Note. When used in main namespace, the word "page" in the following hatnotes is replaced by "article".
{{About|USE1}}→ Script error: No such module "about".{{About|USE1||PAGE2}}(When the disambiguation page has a different name — Note the empty second parameter) → Script error: No such module "about".{{About|USE1|USE2|PAGE2}}(When there is only one other use) → Script error: No such module "about".{{About|USE1|USE2|PAGE2|and|PAGE3}}(Two pages for USE2) → Script error: No such module "about".{{About|USE1|USE2|PAGE2|USE3|PAGE3|USE4|PAGE4|USE5|PAGE5}}(When there are up to five other uses — You should generally create a disambiguation page at this point) → Script error: No such module "about".{{About|USE1|USE2|PAGE2|USE3|PAGE3|other uses}}(When there are several standard other uses and also a disambiguation page with default name — Note that the last page name is not specified) → Script error: No such module "about".{{About|USE1|USE2|PAGE2|USE3|PAGE3|other uses|PAGE4}}(When there are several standard other uses and also a disambiguation page with non-default name) →Script error: No such module "about".{{About|USE1|USE2|PAGE2|USE3|PAGE3|other uses|PAGE4|and}}→ Script error: No such module "about".{{About||USE2|PAGE2|USE3|PAGE3|other uses}}(When you don't need to state the focus of this article/page — Note the empty first parameter) → Script error: No such module "about".{{About|||PAGE1|and|PAGE2}}→ Script error: No such module "about".
- Note:
{{for||PAGE1|PAGE2}}produces the same result.
{{Other uses-section|USE}}(disambiguous) → Template:Other uses-section
- Note: this hatnote says "section", instead of "article" or "page".
"For other uses, see …"
When such a wordy hatnote as {{About}} is not needed, {{Other uses}} is often useful.
{{Other uses}}(disambiguous) → Template:Other uses{{Other uses|PAGE1}}→ Template:Other uses
- Variations
There are, historically, a whole family of "other uses" templates for specific cases. {{About}} is the standard hatnote for "other uses" and many of them can be specified using the {{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 {{About}}, {{Other uses}} or {{For}} templates.
{{Other uses2|PAGE1}}(disambiguous) → Template:Other uses2
- Note: adds "(disambiguation)" to whatever is input as the PAGE1.
- Note:
{{Other uses|PAGE1 (disambiguation)}}produces the same result.
{{Two other uses|USE1|USE2|PAGE2}}→ Template:Two other uses
- Note: same as {{about}}, except it forces a second use to be noted if unspecified by parameters.
{{Two other uses|USE1|USE2|PAGE2|USE3|PAGE3}}→ Template:Two other uses{{Three other uses|USE1|USE2|PAGE2|USE3|PAGE3}}Template:Three other uses{{Three other uses||USE2|PAGE2|USE3|PAGE3}}→ Template:Three other uses{{Three other uses|USE1|USE2|PAGE2|USE3|PAGE3|USE4|PAGE4}}→ Template:Three other uses
"For …, see …"
{{For}} can be used instead of {{About}} so as not to display: This page is about USE1. but still specify a specific other use. This effect can also be achieved by using an empty first parameter in {{About}} as in:
- For example:
{{for|OTHER TOPIC|PAGE1}}is the same as{{About||OTHER TOPIC|PAGE1}}(note the empty first parameter).
However, it is somewhat clearer when using the {{For}} template, since the word "about" does not appear in the statement.
{{For|OTHER TOPIC}}(disambiguous) →{{For|OTHER TOPIC|PAGE1}}→{{For|OTHER TOPIC|PAGE1|PAGE2}}→{{For|OTHER TOPIC|PAGE1|PAGE2|PAGE3}}→{{For||PAGE1|PAGE2}}→ Error: no context parameter provided. Use {{other uses}} for "other uses" hatnotes. (help).
- Variations
As with {{Other uses}}, there are a whole family of "for" templates.
{{For2|OTHER TOPIC|CUSTOM TEXT}}→
{{For example|Pagename|Piped link name}}→ Template:For example
"For other uses of …, see …"
{{Other uses of}}(disambiguous) → Template:Other uses of{{Other uses of|TOPIC}}(disambiguous) → Template:Other uses of{{Other uses of|TOPIC|PAGE1}}→ Template:Other uses of
"For more details on …, see …"
{{Details}} is used to make summary style explicit. To be used in a section for which there is also a separate article on the subject.
{{Details|Article|TOPIC}}→
{{Details3}} allows any text to links:
{{Details3|[[article 1]], [[article 2]], and [[article 3]]|TOPIC}}→ Template:Details3
"Further information: …"
{{See|OTHER TOPIC}}→
Example with multiple parameters
{{See|Iraq and weapons of mass destruction|Saddam Hussein and al-Qaeda|Downing Street memo|Bush-Blair memo}}→
{{Further|[[Article 1]], [[Article 2]], and [[Article Something#3|Article 3]]}}→
This template takes a single parameter of any length.
"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.
{{See also2|OTHER TOPIC|OTHER TOPIC2|OTHER TOPIC3 and other text}}→ Template:See also2
"… redirects here. For other uses, see …"
{{Redirect|REDIRECT}}(disambiguous) →{{Redirect|REDIRECT||PAGE1}}→{{Redirect|REDIRECT|USE1|PAGE1}}→{{Redirect|REDIRECT|USE1|PAGE1|USE2|PAGE2}}→{{Redirect|REDIRECT|USE1|PAGE1|USE2|PAGE2|USE3|PAGE3}}→{{Redirect|REDIRECT|USE1|PAGE1|and|PAGE2}}→{{Redirect|REDIRECT|USE1|PAGE1|USE2|PAGE2|and|PAGE3}}→
- Variations
{{Redirect-acronym|TERM|PAGE}}→{{Redirect2|REDIRECT1|REDIRECT2}}(disambiguous) →{{Redirect2|REDIRECT1|REDIRECT2|USE|PAGE1}}→{{Redirect2|REDIRECT1|REDIRECT2|USE1|PAGE1|USE2|PAGE2}}→{{Redirect2|REDIRECT1|REDIRECT2|USE1|PAGE1|USE2|PAGE2|USE3|PAGE3}}→{{Redirect3|REDIRECT|TEXT}}→{{Redirect4|REDIRECT1|REDIRECT2}}(disambiguous) → Template:Redirect4{{Redirect6|REDIRECT|USE1|PAGE1}}(disambiguous) → Template:Redirect6{{Redirect7|"REDIRECT1", "REDIRECT2", and "REDIRECT3"|USE1|PAGE1|USE2|PAGE2}}→ Template:Redirect7
- Note: If the number of pages redirecting to the target page is two,
{{Redirect2}}can be used instead. If the number is three and there are three corresponding disambiguation pages,{{Redirect10}}can be used.
{{Redirect10|REDIRECT1|REDIRECT2|REDIRECT3}}(disambiguous) → Template:Redirect10
Other people
{{Other persons}}(disambiguous) → Template:Other persons{{Other persons|NAME}}(disambiguous) → Template:Other persons{{Other persons|NAME|PAGE}}→ Template:Other persons{{Other persons|NAME|PAGE|named=titled}}→ Template:Other persons{{Other people2|PAGE}}→ Template:Other people2{{Other people3}}(disambiguous) → Template:Other people3
- Note: same as {{About}} except uses "other people" instead of "other uses" if only 1 parameter is used
{{Other people3|PERSON1}}(disambiguous) → Template:Other people3{{Other people3|PERSON1|PERSON2}}(disambiguous) → Template:Other people3{{Other people3|PERSON1|PERSON2|PAGE2}}→ Template:Other people3{{Other people3|PERSON1||PAGE2}}→ Template:Other people3{{Other people5|NAME1|NAME2|NAME3|NAME4}}→ Template:Other people5
- Note: defaults to "named" as in {{Other persons}}, exists for options like "nicknamed", "known as", etc.
Other places
{{Other places}}, analogous to {{Other uses}} (disambiguous) → Template:Otherplaces{{Other places|PAGE}}, analogous to {{Other uses2}}(disambiguous) → Template:Otherplaces{{Other places3|PAGE}}, analogous to {{Other uses}} → Template:Otherplaces3
Other hurricanes
For articles on storms:
{{Other hurricanes}}(disambiguous) → Template:Other hurricanes{{Other hurricanes|DISAMBIG}}→ Template:Other hurricanes{{Other hurricanes|DISAMBIG|THIS}}→ Template:Other hurricanes{{Other hurricanes||THIS}}→ Template:Other hurricanes
Other ships
For articles on ships:
{{Other ships|SHIP1}}→ Template:Other ships
Distinguish
"Not to be confused with …"
{{Distinguish|PAGE1}}→{{Distinguish|PAGE1|PAGE2|PAGE3|PAGE4}}→{{Distinguish2|TEXT}}→ Template:Distinguish2
"… redirects here. It is not to be confused with …"
{{Redirect-distinguish|REDIRECT|PAGE1}}→{{Redirect-distinguish|REDIRECT|PAGE1|PAGE2|PAGE3|PAGE4}}→{{Redirect-distinguish2|REDIRECT|TEXT}}→
"… is a common misspelling of …
{{Misspelling|PAGE2}}→ Template:Misspelling
"Main article: …" and more
{{Main|Main Article}}→{{Main|Main Article|Article2}}→{{Main list|Article1}}→{{ArticlePreceeding|George Washington}}→ Template:ArticlePreceeding{{ArticleSucceeding|Thomas Jefferson}}→ Template:ArticleSucceeding{{ArticlePair|George Washington|Thomas Jefferson}}→ Template:ArticlePair
Wikipedia self-reference
{{Selfref|ANYTEXT}}→
- Note: 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: Manual of Style (self-references to avoid) for more details).
Categories
Category-specific templates produce bold category names.
{{Category see also|THIS|THAT|THE OTHER}}→
{{Related category|CAT2}}→ Template:Related category
This 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.
{{CatPreceding|OTHER TOPIC}}→
- REDIRECT Template:Preceding category
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
{{CatSucceeding|OTHER TOPIC}}→
- REDIRECT Template:Succeeding category
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
{{Category pair|TOPIC1|TOPIC2}}→
{{Contrast|OTHERCAT}}→{{Contrast2|OTHERCAT}}(plural) → Template:Contrast2
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.
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 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.
- 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 sandbox and test cases.
See also
Template:Navbox hatnote templates
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 Module:Hatnote templates documentation/doc. (edit | history) Editors can experiment in this module's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this module. |