Difference between revisions of "Template:Subcategory"
From Kerbal Space Program Wiki
m (*renamed Parameter Table to Parameter table;) |
m (fix) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly>[[Category:{{#titleparts: {{PAGENAME}}|{{#if: {{{2|}}}|{{{2}}}|-1}}}} {{{1}}}|{{#titleparts: {{PAGENAME}}||{{#if: {{{2|}}}|{{{2}}}|-1}}}}]]</includeonly><noinclude> | + | <includeonly>[[Category:{{#titleparts: {{PAGENAME}}|{{#if: {{{2|}}}|{{{2}}}|-1}}}} {{{1}}}|{{#titleparts: {{PAGENAME}}||{{#if: {{{2|}}}|{{{2}}}|-1}}}}]]</includeonly><noinclude> |
− | + | {{Documentation}} | |
− | |||
− | |||
− | { | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
[[Category:Formatting and function templates]]</noinclude> | [[Category:Formatting and function templates]]</noinclude> |
Latest revision as of 21:53, 2 February 2020
Contents
Purpose
This template adds the article to a category which begins with the name of the article and is sorted with the rest of the name.
Usage
# | Optional | Description | Default |
---|---|---|---|
1 | No | Subcategory name suffix | |
2 | Yes | Number of title parts which are used for the category name. | -1 |
Examples
For example in Template:Infobox/Part/ISP this would add it to Category:Infobox/Part {{{1}}}
with the sortkey ISP.
- Currently only negative values for the second parameter are supported.
See also
- Template:Subcategory on Wikipedia
The above documentation is transcluded from Template:Subcategory/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. |