Difference between revisions of "Template:(Dis)estCatUSstateCentury/core"

From blackwiki
Jump to navigation Jump to search
blackwiki>BrownHairedGirl
(fix cat see also)
blackwiki>BrownHairedGirl
(populate millennium category only if it exists)
Line 42: Line 42:
 
[[Category:{{Ordinal|{{{centurynum}}}}} century in {{{state}}}|/{{{type}}}]]
 
[[Category:{{Ordinal|{{{centurynum}}}}} century in {{{state}}}|/{{{type}}}]]
 
[[Category:{{Ordinal|{{{centurynum}}}}}-century {{{type}}} in the United States|{{{state}}}]]
 
[[Category:{{Ordinal|{{{centurynum}}}}}-century {{{type}}} in the United States|{{{state}}}]]
{{#if:{{#expr: 1 + floor({{{MC}}} / 10)}}| [[Category:{{Ordinal|{{#expr: 1 + floor({{{MC}}} / 10)}}}}-millennium {{{type}}} in {{{state}}}]]
+
{{#ifexist: Category:{{Ordinal|{{#expr: 1 + floor({{{MC}}} / 10)}}}}-millennium {{{type}}} in {{{state}}}<!--
 +
  -->| [[Category:{{Ordinal|{{#expr: 1 + floor({{{MC}}} / 10)}}}}-millennium {{{type}}} in {{{state}}}]]
 
|}}</includeonly><noinclude>
 
|}}</includeonly><noinclude>
 
{{Documentation|Template:(Dis)estCatUSstateCentury/doc}}
 
{{Documentation|Template:(Dis)estCatUSstateCentury/doc}}
 
</noinclude>
 
</noinclude>

Revision as of 08:48, 2 March 2020

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

Creates a category of the form "YYth-century establishments in Foo" or "YYth-century disestablishments in Foo", where "YY" is a 2-digit century, and "Foo" is a state of the United States.

The template detects whether this is an "establishments" or "disestablishments" category, and adjusts accordingly.

Usage

{{(Dis)estCatUSstateCentury}}

No parameters are needed.

See also