Difference between revisions of "Template:Category by decade"
Jump to navigation
Jump to search
imported>Peter coxhead (allow minimum (min) parameter) |
imported>Peter coxhead (added parentyrcat parameter) |
||
| Line 9: | Line 9: | ||
* {{LinkCatIfExists2|{{{cat}}} {{#expr:{{{decade|}}} + 30}}s|{{#expr:{{{decade|}}} + 30}}s}} {{LinkCatIfExists2|{{{cat}}} {{#expr:{{{decade|}}} + 40}}|→}} | * {{LinkCatIfExists2|{{{cat}}} {{#expr:{{{decade|}}} + 30}}s|{{#expr:{{{decade|}}} + 30}}s}} {{LinkCatIfExists2|{{{cat}}} {{#expr:{{{decade|}}} + 40}}|→}} | ||
|}{{#if:{{{parentcat|}}}|[[Category:{{{parentcat}}}|{{{sortkey|{{{decade}}}s}}}]] | |}{{#if:{{{parentcat|}}}|[[Category:{{{parentcat}}}|{{{sortkey|{{{decade}}}s}}}]] | ||
| + | }} | ||
| + | {{#if:{{{parentyrcat|}}}|[[Category:{{{parentyrcat}}} {{{decade}}}s]] | ||
}}<noinclude> | }}<noinclude> | ||
{{documentation}}<!-- | {{documentation}}<!-- | ||
Latest revision as of 07:08, 4 May 2018
|
Basic usage
{{Category by decade
| decade = The decade of the category, e.g. 1990 (omitting the terminal "s")
| cat = The name of the category, omitting the decade, e.g. "Plants described in the"
| parentcat = e.g. "Plants described in the 20th century"
}}
Additional parameters
| min = Earliest (minimum) year to be shown, e.g. 1753 (decade calculated) | sortkey = Sort key for the parentcat (if omitted, uses the decade of the category) | parentyrcat = Optionally, the name of the parent "by decade" category, omitting the decade, e.g. "Species described in the"
| The above documentation is transcluded from Template:Category by decade/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. |