Template:Disambiguation/doc: Difference between revisions

Jump to navigation Jump to search
m (1 revision imported)
m (1 revision imported)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{Documentation subpage}}
<noinclude>{{pp-vandalism|small=yes}}</noinclude>{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[</nowiki>[[Wikipedia:Wikidata]]<nowiki>]]) -->
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[</nowiki>[[Wikipedia:Wikidata]]<nowiki>]]) -->
{{High-risk| 182901 }}
{{High-use| 189183 }}
{{Nosubst}}
{{Nosubst}}
{{Dabnav}}
{{Dabnav}}
{{Shortcut|Template:Dab|Template:Disambig}}
{{tsh|Dab|Disambig}}
This is the {{tl|Disambiguation}} template.
This is the {{tl|Disambiguation}} template.


'''<big>Important: Please do not [[Wikipedia:Substitution|subst:]] this template.</big>'''
This is a general-purpose template, to be placed at the bottom of any article that exists to help readers find other articles with the same or similar names. This concept is called ''[[Wikipedia:Disambiguation|disambiguation]]'' and is used with many common words, such as ''[[Cross (disambiguation)|cross]]'', ''[[Life (disambiguation)|life]]'' and ''[[work]]''. This template automatically adds articles to the [[:Category:Disambiguation pages]].
 
This is a general-purpose template, to be placed at the bottom of any article that exists to help readers find other articles with the same or similar names. This concept is called ''[[Wikipedia:Disambiguation|disambiguation]]'' and is used with many common words, such as ''[[Cross (disambiguation)|cross]]'', ''[[Life (disambiguation)|life]]'' and ''[[work]]''. This template automatically adds articles to the [[:Category:Disambiguation pages]].  


== Page title fixes ==
== Page title fixes ==
Line 27: Line 25:
* {{tl|Chinese title disambiguation}} – [[:Category:Disambiguation pages with Chinese character titles]]
* {{tl|Chinese title disambiguation}} – [[:Category:Disambiguation pages with Chinese character titles]]
* {{tl|Genus disambiguation}} – [[:Category:Genus disambiguation pages]]
* {{tl|Genus disambiguation}} – [[:Category:Genus disambiguation pages]]
* {{tl|Place name disambiguation}} – [[:Category:Place name disambiguation pages]]
* {{tl|Human name disambiguation}} – [[:Category:Human name disambiguation pages]]
* {{tl|Human name disambiguation}} – [[:Category:Human name disambiguation pages]]
** {{tl|Human name disambiguation cleanup}}
** {{tl|Human name disambiguation cleanup}}
Line 37: Line 34:
* {{tl|Number disambiguation}} – [[:Category:Lists of ambiguous numbers]]
* {{tl|Number disambiguation}} – [[:Category:Lists of ambiguous numbers]]
* {{tl|Phonetics disambiguation}} – [[:Category:Linguistics disambiguation pages]]
* {{tl|Phonetics disambiguation}} – [[:Category:Linguistics disambiguation pages]]
* {{tl|Place name disambiguation}} – [[:Category:Place name disambiguation pages]]
* {{tl|Road disambiguation}} – [[:Category:Road disambiguation pages]]
* {{tl|Road disambiguation}} – [[:Category:Road disambiguation pages]]
* {{tl|School disambiguation}} for educational institutions – [[:Category:Educational institution disambiguation pages]]
* {{tl|School disambiguation}} for educational institutions – [[:Category:Educational institution disambiguation pages]]
* {{tl|Species Latin name disambiguation}} – [[:Category:Latin name disambiguation pages]]
* {{tl|Species Latin name disambiguation}} – [[:Category:Latin name disambiguation pages]]
* {{tl|Station disambiguation}} for railway and public transport stations – [[:Category:Station disambiguation pages]]
* {{tl|Station disambiguation}} for railway and public transport stations – [[:Category:Station disambiguation pages]]
* {{tl|Synagogue disambiguation}} for synagogues – [[:Category:Synagogue disambiguation pages]]
* {{tl|Wikipedia disambiguation}} for ambiguous titles and shortcuts in the Wikipedia namespace – [[:Category:Wikipedia disambiguation pages]]
* {{tl|Wikipedia disambiguation}} for ambiguous titles and shortcuts in the Wikipedia namespace – [[:Category:Wikipedia disambiguation pages]]


Line 51: Line 50:


Only add a parameter from this list if the disambiguation page has several items of that type:
Only add a parameter from this list if the disambiguation page has several items of that type:
* {{tlx|Disambiguation|human name}}: for [[:Category:Human name disambiguation pages]] (note that you must instead add the category separately if it needs a different [[WP:SORTKEY|sort key]])
* {{tlx|Disambiguation|human name}}: for [[:Category:Human name disambiguation pages]]
** {{tlx|Disambiguation|hn{{=}}sortkey}} for [[:Category:Human name disambiguation pages]] with a specified [[WP:SORTKEY|sort key]] (e.g. {{tlx|Disambiguation|hn{{=}}Doe, John}})
* {{tlx|Disambiguation|bird}}: for [[:Category:Bird common name disambiguation pages]]
* {{tlx|Disambiguation|bird}}: for [[:Category:Bird common name disambiguation pages]]
* {{tlx|Disambiguation|church}}: for [[:Category:Church building disambiguation pages]]
* {{tlx|Disambiguation|church}}: for [[:Category:Church building disambiguation pages]]
Line 82: Line 82:
* {{tlx|Disambiguation|surname}}: for [[:Category:Disambiguation pages with surname-holder lists]]
* {{tlx|Disambiguation|surname}}: for [[:Category:Disambiguation pages with surname-holder lists]]


This parameter reflects the title, not the contents:  
This parameter reflects the title, not the contents:


* {{tlx|Disambiguation|chinese}}: for [[:Category:Disambiguation pages with Chinese character titles]]
* {{tlx|Disambiguation|chinese}}: for [[:Category:Disambiguation pages with Chinese character titles]]
Line 113: Line 113:
* {{tl|Template other}}
* {{tl|Template other}}
* {{tl|Title disambig text}}
* {{tl|Title disambig text}}
* {{tl|Title without disambig}}
* {{tl|PAGENAMEBASE}}
* {{tl|Trim}}
* {{tl|Trim}}
* {{tl|Str rep}}
* {{tl|Str rep}}
Line 122: Line 122:


==TemplateData==
==TemplateData==
{{TemplateDataHeader}}
{{TemplateData header}}
<templatedata>
<templatedata>
{
{
Line 129: Line 129:
         "1": {
         "1": {
             "label": "1",
             "label": "1",
             "description": "Used to put the page in a category. Can be one of 'split' (dab pages in need of being split); 'clean up','clean-up','cleanup' (dabs in need of cleanup); 'airports','airport' (airport dabs); 'call sign','call signs','broadcast call sign','broadcast call signs','callsign' (broadcast call sign dabs); 'chinese char','chinese-char','chinesechar','chinese character','chinese' (chinese character dabs); 'churches','church building','church buildings','church' (church building dabs), 'fish' (fish dabs); 'geodis','geography','geographical','place name','place names','place','places','geo' (Place names); 'county'; 'uscounty' (United States county dabs); 'township' (Township name dabs); 'name','names','human name','human names','hn','hndis' (Human name dabs); 'surnames','surname' (surname dabs); 'given names','given name' (given-name dabs), 'hospital name','hospital names','hospitals','hospital' (hospital dabs); 'latin name','latin names','latin' (Latin name dabs); 'letter-number','letter number' (Letter-number combination dabs); 'mathdab','maths','mathematics','mathematical','math' (mathematical dabs); 'numberdis','numbers','ambiguous number','ambiguous numbers','number' (Lists of ambiguous numbers), 'plants','plant' (Plant common name dabs); 'roaddis','roads','road' (road dabs), 'schooldis','schools','educational institution','educational institutions','college','colleges','university','universities','school' (Educational institution dabs); 'political','party' (political party dabs), 'genus' (Genus dabs)",
             "description": "Used to put the page in a category. Can be one of 'split' (dab pages in need of being split); 'clean up','clean-up','cleanup' (dabs in need of cleanup); 'airports','airport' (airport dabs); 'call sign','call signs','broadcast call sign','broadcast call signs','callsign' (broadcast call sign dabs); 'chinese char','chinese-char','chinesechar','chinese character','chinese' (chinese character dabs); 'churches','church building','church buildings','church' (church building dabs), 'fish' (fish dabs); 'geodis','geography','geographical','place name','place names','place','places','geo' (Place names); 'county'; 'uscounty' (United States county dabs); 'township' (Township name dabs); 'name','names','human name','human names','hn','hndis' (Human name dabs); 'surnames','surname' (surname dabs); 'given names','given name' (given-name dabs), 'hospital name','hospital names','hospitals','hospital' (hospital dabs); 'latin name','latin names','latin' (Latin name dabs); 'letter-number','letter number' (Letter-number combination dabs); 'mathdab','maths','mathematics','mathematical','math' (mathematical dabs); 'numberdis','numbers','ambiguous number','ambiguous numbers','number' (Lists of ambiguous numbers), 'plants','plant' (Plant common name dabs); 'roaddis','roads','road' (road dabs), 'schooldis','schools','educational institution','educational institutions','college','colleges','university','universities','school' (Educational institution dabs); 'political','party' (political party dabs), 'genus' (Genus dabs)",
             "type": "string",
             "type": "string",
             "required": false
             "required": false
Line 184: Line 184:
             "label": "10",
             "label": "10",
             "description": "Further category keys, as parameter 1.",
             "description": "Further category keys, as parameter 1.",
            "type": "string",
            "required": false
        },
        "hn": {
            "label": "hn",
            "description": "Human name disambiguation page with its own sort key.",
             "type": "string",
             "type": "string",
             "required": false
             "required": false
Line 224: Line 230:
== See also ==
== See also ==
* [[Wikipedia:Hatnote]]
* [[Wikipedia:Hatnote]]
* {{tl|Dablinks}}{{snd}}lists wikilinks on the page that link to disambiguation pages
* {{tl|Disambiguation needed}} – Adds an inline "disambiguation needed" tag to an ambiguous link within an article, see [[Wikipedia:OTHERUSES]] for more.
* {{tl|Disambiguation needed}} – Adds an inline "disambiguation needed" tag to an ambiguous link within an article, see [[Wikipedia:OTHERUSES]] for more.
* {{tl|WikiProject Disambiguation}} – for disambig talkpages
* {{tl|WikiProject Disambiguation}} – for disambig talkpages
* {{tl|Other uses}} – for linking to disambiguation pages in articles
* {{tl|Other uses}} – for linking to disambiguation pages in articles


<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Disambiguation message boxes| ]]
[[Category:Disambiguation message boxes| ]]
}}</includeonly>
}}</includeonly>

Latest revision as of 02:05, 13 January 2021

This is the {{Disambiguation}} template.

This is a general-purpose template, to be placed at the bottom of any article that exists to help readers find other articles with the same or similar names. This concept is called disambiguation and is used with many common words, such as cross, life and work. This template automatically adds articles to the Category:Disambiguation pages.

Page title fixes

This template will automatically detect incomplete disambiguation present in page titles. If the title includes anything other than (disambiguation) in parentheses, it is assumed to be the article type. For example, this template on the page 1st Division (France) would produce the text "This disambiguation page lists France articles associated with the title 1st Division". If the page title contains parentheses that are not used for disambiguation (such as Everything You Always Wanted to Know About Sex* (*But Were Afraid to Ask)), set |ignore_parentheses=yes. If you wish to manually specify the article type, use the |type= parameter.

Variant templates

Disambiguation

For disambiguation pages requiring cleanup, use {{Disambiguation cleanup}}.

More specific and alternative templates exist for disambiguation pages whose entries are limited exclusively to items of a particular type:

Note: A set index article (SIA) is not a disambiguation page; it is a list article about a set of items of a specific type that also share the same (or similar) name. Wikipedia:Set index articles includes templates for SIAs.

Parameters

Sometimes there isn't a specific disambiguation template (see list above) that fits for a page, or the page has items in more than one of the above classes. Then use {{Disambiguation}} but with one or more parameters telling which categories to use. Up to ten parameters can be fed, and in any order, for example:

{{Disambiguation|school|hospital}}

Only add a parameter from this list if the disambiguation page has several items of that type:

These can be added if there are one or more elements in the list (per their category descriptions):

These can be added even if there's only one element in the list, since these types are not actually ambiguous:

This parameter reflects the title, not the contents:

And this parameter reflects a maintenance need, not the contents:

Note that {{Disambiguation}} might not have parameters for all subcategories of Category:Disambiguation pages, then you have to manually add the category to the disambig page.

Nocat

If categorization is not needed on pages that are not in mainspace, then the "nocat" parameter may be set equal to "true" or "yes" as follows:

Redirects

The following redirect to this template:

Technical details

Internally, this template uses {{Dmbox}}. That template categorises pages into Category:All disambiguation pages and Category:All article disambiguation pages.

This template also uses {{Disambiguation/cat}} to handle the categorisation parameters, such as "hospital" and "school".

Other templates and modules used:

Template use

Place template at the foot of the disambiguation page after all of the disambiguation content but before any categories (see below) (interlanguage links to Wikidata), as per the WP:DCAT guideline.

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Disambiguation

Place at the bottom of Disambiguation pages.

Template parameters

ParameterDescriptionTypeStatus
11

Used to put the page in a category. Can be one of 'split' (dab pages in need of being split); 'clean up','clean-up','cleanup' (dabs in need of cleanup); 'airports','airport' (airport dabs); 'call sign','call signs','broadcast call sign','broadcast call signs','callsign' (broadcast call sign dabs); 'chinese char','chinese-char','chinesechar','chinese character','chinese' (chinese character dabs); 'churches','church building','church buildings','church' (church building dabs), 'fish' (fish dabs); 'geodis','geography','geographical','place name','place names','place','places','geo' (Place names); 'county'; 'uscounty' (United States county dabs); 'township' (Township name dabs); 'name','names','human name','human names','hn','hndis' (Human name dabs); 'surnames','surname' (surname dabs); 'given names','given name' (given-name dabs), 'hospital name','hospital names','hospitals','hospital' (hospital dabs); 'latin name','latin names','latin' (Latin name dabs); 'letter-number','letter number' (Letter-number combination dabs); 'mathdab','maths','mathematics','mathematical','math' (mathematical dabs); 'numberdis','numbers','ambiguous number','ambiguous numbers','number' (Lists of ambiguous numbers), 'plants','plant' (Plant common name dabs); 'roaddis','roads','road' (road dabs), 'schooldis','schools','educational institution','educational institutions','college','colleges','university','universities','school' (Educational institution dabs); 'political','party' (political party dabs), 'genus' (Genus dabs)

Stringoptional
22

Further category keys, as parameter 1.

Stringoptional
33

Further category keys, as parameter 1.

Stringoptional
44

Further category keys, as parameter 1.

Stringoptional
55

Further category keys, as parameter 1.

Stringoptional
66

Further category keys, as parameter 1.

Stringoptional
77

Further category keys, as parameter 1.

Stringoptional
88

Further category keys, as parameter 1.

Stringoptional
99

Further category keys, as parameter 1.

Stringoptional
1010

Further category keys, as parameter 1.

Stringoptional
hnhn

Human name disambiguation page with its own sort key.

Stringoptional
page-titlepage-title

Page title to use, only useful for special cases when default does not work.

Default
(FULLPAGENAME)
Stringoptional
nocatnocat

Set to 'yes' to prevent categorisation.

Stringoptional
demospacedemospace

Used for testing.

Stringoptional
ignore_parenthesesignore_parentheses

Set to 'yes' to prevent parentheses in the article title from being parsed as incomplete disambiguation.

Stringoptional
typetype

Manually specify the article type in the descriptive text ('This disambiguation page lists {{{type}}} articles...')

Stringoptional

See also