Difference between revisions of "Template:EstcatCanadaprovinceDecade"

From blackwiki
Jump to navigation Jump to search
imported>Fayenatic london
({{YearInCountryPortalBox}})
imported>BrownHairedGirl
(fix my bad)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{YearInCountryPortalBox}}
+
<includeonly>{{Category other
Organizations, places or other things founded or established in '''[[{{{4}}}]]''' in the '''[[{{{1}}}{{#ifeq:{{{2}}} | 0 | {{{2}}}0–{{{1}}}{{{2}}}9{{!}}{{{1}}}}}{{{2}}}0s]]'''.
+
    |<!--
 +
      # It is a category, so proceed
 +
      # First check that this page's title is of the format "YYY0s establishments in Foo" ... where Foo is a province or territory of Canada
 +
    -->{{#ifeq: {{#invoke:String|match|s={{PAGENAME}}|pattern=^%d%d%d0s establishments in .+$|start=1|match=1|plain=false |nomatch=%%nomatch%%}} |%%nomatch%%<!--
 +
      -->|<!--
 +
              # Not a valid page
 +
          -->{{Error|ERROR. [[Template:EstcatCanadaprovinceDecade]] is for use only on pages with a title of the form "Category:YYY0s establishments in Foo", where YYY0s is a 4-digit decade and Foo is a province or territory of Canada.}}<!--
 +
          -->[[Category:Template EstcatCanadaprovinceDecade province on invalid page]]
 +
      -->|<!--
 +
              # A valid page
 +
          -->{{EstcatCanadaprovinceDecade/core
 +
                | decade={{#invoke:String|match|s={{PAGENAME}}|pattern=^%d%d%d0|start=1|match=1|plain=false}}<!--
 +
              -->| province={{#invoke:String|replace|source={{PAGENAME}}|pattern=^%d%d%d0s establishments in t?h?e? ?|replace=|count=1|plain=false}}<!--
 +
          -->}}<!--
 +
    -->}}<!--
 +
-->|<!--
 +
    # Not a category
 +
  -->|{{Error|message=ERROR.  [[Template:EstcatCanadaprovinceDecade]] is for use only on category pages}}<!--
 +
  -->[[Category:Template EstcatCanadaprovinceDecade on invalid page]]<!--
 +
-->}}<!--
 +
--></includeonly><!--
 +
# Note {{CatAutoTOC}} needs to be available whether or not this template page has been transcluded
 +
-->{{CatAutoTOC}}<!--
 +
--><noinclude><!--
 +
-->{{Documentation}}
 +
<!-- Add categories and interwikis to the /doc subpage, please, not here! -->
  
{{BDDecadesInCentury|{{{1}}}|{{{3}}}|establishments in {{{4}}}}}
 
 
[[Category:{{{3}}}-century establishments in {{{4}}}| {{PAGENAME}}]]
 
[[Category:Establishments in {{{4}}} by decade]]
 
[[Category:{{{1}}}{{{2}}}0s in {{{4}}}| Establishments]]
 
[[Category:{{{1}}}{{{2}}}0s establishments in Canada|{{{5|{{{4}}}}}}]]
 
 
</includeonly><noinclude>
 
{{Documentation}}
 
 
</noinclude>
 
</noinclude>

Latest revision as of 06:19, 19 March 2020

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

Creates a category for establishments in a given decade in a province or territory of Canada, e.g. Category:1920s establishments in Alberta or Category:2000s establishments in Yukon

Usage

{{EstcatCanadaprovinceDecade}}

No parameters are needed.

See also