Difference between revisions of "Template:Category by decade"

From blackwiki
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

  • ← -30s
  • -20s
  • -10s
  • 0s
  • 10s
  • 20s
  • 30s →
50px Template documentation[view] [edit] [history] [purge]

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"