Difference between revisions of "Template:Category disambiguation"

From blackwiki
Jump to navigation Jump to search
imported>JJMC89
(includeonly)
imported>QEDK
(disallow substitution)
Line 1: Line 1:
<includeonly>__EXPECTUNUSEDCATEGORY__</includeonly>{{Cmbox
+
{{SAFESUBST:<noinclude />#invoke:Unsubst||$B=<includeonly>__EXPECTUNUSEDCATEGORY__</includeonly>{{Cmbox
 
| type  = content
 
| type  = content
 
| image = [[File:Disambig gray.svg|50px]]
 
| image = [[File:Disambig gray.svg|50px]]
Line 55: Line 55:
 
:For {{{97}}}, see {{Category disambiguation/category link|{{{98}}}|allowredlink={{{allowredlink|}}}}}}}}}{{#if: {{{99|}}}|{{#if: {{{100|}}}|
 
:For {{{97}}}, see {{Category disambiguation/category link|{{{98}}}|allowredlink={{{allowredlink|}}}}}}}}}{{#if: {{{99|}}}|{{#if: {{{100|}}}|
 
:For {{{99}}}, see {{Category disambiguation/category link|{{{100}}}|allowredlink={{{allowredlink|}}}}}}}}}
 
:For {{{99}}}, see {{Category disambiguation/category link|{{{100}}}|allowredlink={{{allowredlink|}}}}}}}}}
'''Note:''' This category page should be empty.  All entries should be recategorized under one of the above categories or an appropriate subcategory.}}<includeonly>{{#ifeq: {{lc:{{{nocat|false}}}}}|false|{{Single namespace|category|[[Category:Disambiguation categories]]}}|<!-- Category suppressed -->}}{{#ifexpr:{{PAGESINCATEGORY:{{PAGENAME}}|R}}|[[Category:Non-empty disambiguation categories]]|<!-- No category -->}}</includeonly><noinclude>{{Documentation}}
+
'''Note:''' This category page should be empty.  All entries should be recategorized under one of the above categories or an appropriate subcategory.}}<includeonly>{{#ifeq: {{lc:{{{nocat|false}}}}}|false|{{Single namespace|category|[[Category:Disambiguation categories]]}}|<!-- Category suppressed -->}}{{#ifexpr:{{PAGESINCATEGORY:{{PAGENAME}}|R}}|[[Category:Non-empty disambiguation categories]]|<!-- No category -->}}}}</includeonly><noinclude>{{Documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 17:23, 25 April 2020

{{SAFESUBST:#invoke:Unsubst||$B=

Template documentation[view] [edit] [history] [purge]

Usage

To disambiguate between Category:Eremophila (bird) and Category:Eremophila (plant), simply add the following to Category:Eremophila:

{{Category disambiguation|the bird genus|Eremophila (bird)|the plant genus|Eremophila (plant)}}

The template expects at least four parameters (two description/category pairs), but can accommodate up to 100 parameters (50 description/category pairs).

Note that since a tweak in July 2020, this template trims leading and trailing whitespace from its parameters. This allows the use of a more readable multi-line layout. The example above can now be written as:

{{Category disambiguation
 | the bird genus | Eremophila (bird)
 | the plant genus | Eremophila (plant)
}}

... or, if you prefer

{{Category disambiguation
 | the bird genus
 | Eremophila (bird)

 | the plant genus
 | Eremophila (plant)
}}

Categorisation

This template automatically categorises category namespace pages into Category:Disambiguation categories. If the category isn't empty, it also categorizes it into Category:Non-empty disambiguation categories.

See also