Template:In category: Difference between revisions
mediawiki>DMacks (+vi, Fulfilling edit request by Vinhtantran. Thanks for helping!) |
imported>Ais523 (allow overriding the "and" to an "or", for templates that categorise into one of two categories rather than both at once) |
||
Line 1: | Line 1: | ||
{{hatnote|This template will categorize into <!-- | |||
-->{{cl|{{{1}}}}}{{#if:{{{2|}}}|{{#if:{{{3|}}}|, | {{{and|{{int:and}}}}} }}<!-- | |||
-->{{cl|{{{2}}}}}}}{{#if:{{{3|}}}|{{#if:{{{4|}}}|, | {{{and|{{int:and}}}}} }}<!-- | |||
-->{{cl|{{{3}}}}}}}{{#if:{{{4|}}}|{{#if:{{{5|}}}|, | {{{and|{{int:and}}}}} }}<!-- | |||
-->{{cl|{{{4}}}}}}}{{#if:{{{5|}}}| {{{and|{{int:and}}}}} {{cl|{{{5}}}}}}}.}}<noinclude> | |||
-->{{cl|{{{1}}}}}{{#if:{{{2|}}}|{{#if:{{{3|}}}|, | {{int:and}} }}<!-- | |||
-->{{cl|{{{2}}}}}}}{{#if:{{{3|}}}|{{#if:{{{4|}}}|, | {{int:and}} }}<!-- | |||
-->{{cl|{{{3}}}}}}}{{#if:{{{4|}}}|{{#if:{{{5|}}}|, | {{int:and}} }}<!-- | |||
-->{{cl|{{{4}}}}}}}{{#if:{{{5|}}}| {{int:and}} {{cl|{{{5}}}}}}} | |||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> |
Revision as of 06:56, 18 July 2022
The {{In category}} template is designed for use on the documentation subpages of templates. It produces a hatnote that specifies into which category the documented template is categorised.
Basic usage is along the lines of {{In category|Candidates for speedy deletion}}, which produces the following message:
It is possible to specify more than one category, e.g. {{In category|Candidates for speedy deletion|Candidates for speedy deletion by user}} produces:
Up to five categories are supported.
To override the "and" with another conjunction, use the |and=
parameter.
For example, {{In category|Candidates for speedy deletion|Candidates for speedy deletion by user}} would produce:
Produces a note about which categories a template will categorize the pages it's applied to into.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Category 1 | 1 | The first category into which the documented template categorises | Unknown | required |
Category 2 | 2 | The second category into which the documented template categorises | Unknown | optional |
Category 3 | 3 | The third category into which the documented template categorises | Unknown | optional |
Category 4 | 4 | The fourth category into which the documented template categorises | Unknown | optional |
Category 5 | 5 | The fifth category into which the documented template categorises | Unknown | optional |
Override for "and" | and | A word to use instead of "and" when writing the lists of categories that the documented template categorises into. Only used if at least two templates are listed.
| Content | optional |