Difference between revisions of "Template:DisestcatCanadaprovince"

From blackwiki
Jump to navigation Jump to search
imported>MusikAnimal
m (Protected "Template:DisestcatCanadaprovince": High-risk template ([Edit=Require autoconfirmed or confirmed access] (indefinite) [Move=Require autoconfirmed or confirmed access] (indefinite)))
imported>BrownHairedGirl
(make parameterless)
Line 1: Line 1:
<includeonly>{{Portal|{{{3}}}|Years}}
+
<includeonly>{{Category other
Organizations, places or other things disestablished in {{CanadaProvinceThe|{{{3}}}}}'''[[{{{3}}}]]''' in the year '''[[{{{1}}}{{{2}}}]]'''.
+
    |<!--
{| class="toccolours" style="margin:1em auto;"
+
      # It is a category, so proceed
|[[:Category:{{{1}}}0s disestablishments in {{CanadaProvinceThe|{{{3}}}}}{{{3}}}|{{{1}}}0s disestablishments in {{CanadaProvinceThe|{{{3}}}}}{{{3}}}]]:  
+
      # First check that this page's title is of the format "YYYY disestablishments in Foo"
|{{LinkCatIfExists2|{{#expr: {{{1}}}0 - 1}} disestablishments in {{CanadaProvinceThe|{{{3}}}}}{{{3}}}|&larr;}} {{LinkCatIfExists2|{{{1}}}0 disestablishments in {{CanadaProvinceThe|{{{3}}}}}{{{3}}}|{{{1}}}0}} • {{LinkCatIfExists2|{{{1}}}1 disestablishments in {{CanadaProvinceThe|{{{3}}}}}{{{3}}}|{{{1}}}1}} • {{LinkCatIfExists2|{{{1}}}2 disestablishments in {{CanadaProvinceThe|{{{3}}}}}{{{3}}}|{{{1}}}2}} • {{LinkCatIfExists2|{{{1}}}3 disestablishments in {{CanadaProvinceThe|{{{3}}}}}{{{3}}}|{{{1}}}3}} • {{LinkCatIfExists2|{{{1}}}4 disestablishments in {{CanadaProvinceThe|{{{3}}}}}{{{3}}}|{{{1}}}4}} • {{LinkCatIfExists2|{{{1}}}5 disestablishments in {{CanadaProvinceThe|{{{3}}}}}{{{3}}}|{{{1}}}5}} • {{LinkCatIfExists2|{{{1}}}6 disestablishments in {{CanadaProvinceThe|{{{3}}}}}{{{3}}}|{{{1}}}6}} • {{LinkCatIfExists2|{{{1}}}7 disestablishments in {{CanadaProvinceThe|{{{3}}}}}{{{3}}}|{{{1}}}7}} • {{LinkCatIfExists2|{{{1}}}8 disestablishments in {{CanadaProvinceThe|{{{3}}}}}{{{3}}}|{{{1}}}8}} • {{LinkCatIfExists2|{{{1}}}9 disestablishments in {{CanadaProvinceThe|{{{3}}}}}{{{3}}}|{{{1}}}9}} {{LinkCatIfExists2|{{#expr: {{{1}}}9 + 1}} disestablishments in {{CanadaProvinceThe|{{{3}}}}}{{{3}}}|&rarr;}}
+
    -->{{#ifeq: {{#invoke:String|match|s={{PAGENAME}}|pattern=^%d%d%d%d disestablishments in .+$|start=1|match=1|plain=false |nomatch=%%nomatch%%}} |%%nomatch%%<!--
|}
+
      -->|<!--
{{Category see also if exists| {{{1}}}{{{2}}} establishments in {{CanadaProvinceThe|{{{3}}}}}{{{3}}}}}
+
              # Not a valid page
 
+
          -->{{Error|ERROR. [[Template:DisestcatCanadaprovince]] is for use only on pages with a title of the form "Category:YYYY disestablishments in Foo", where YYYY is a 4-digit year.}}<!--
[[Category:{{{1}}}0s disestablishments in {{CanadaProvinceThe|{{{3}}}}}{{{3}}}]]
+
          -->[[Category:Template DisestcatCanadaprovince on invalid page]]
{{#ifexpr: {{{1}}} < 100 | [[Category:Disestablishments in {{CanadaProvinceThe|{{{3}}}}}{{{3}}} by year|0{{{1}}}]] | [[Category:Disestablishments in {{CanadaProvinceThe|{{{3}}}}}{{{3}}} by year]]}}
+
      -->|<!--
[[Category:{{{1}}}{{{2}}} in {{CanadaProvinceThe|{{{3}}}}}{{{3}}}|Disestablishments]]
+
              # A valid page
[[Category:{{{1}}}{{{2}}} disestablishments in Canada|{{{3}}}}]]
+
          -->{{DisestcatCanadaprovince/core
</includeonly><noinclude>
+
                | year={{#invoke:String|match|s={{PAGENAME}}|pattern=^%d%d%d%d|start=1|match=1|plain=false}}<!--
 +
              -->| province={{#invoke:String|replace|source={{PAGENAME}}|pattern=^%d%d%d%d disestablishments in t?h?e? ?|replace=|count=1|plain=false}}<!--
 +
          -->}}<!--
 +
    -->}}<!--
 +
-->|<!--
 +
    # Not a category
 +
  -->|{{Error|message=ERROR.  [[Template:DisestcatCanadaprovince]] is for use only on category pages}}<!--
 +
  -->[[Category:Template DisestcatCanadaprovince on invalid page]]<!--
 +
-->}}</includeonly><noinclude>
 
<!-- Add categories and interwikis to the /doc subpage, please, not here! -->  
 
<!-- Add categories and interwikis to the /doc subpage, please, not here! -->  
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 05:43, 19 February 2019

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

Usage

{{DisestcatCanadaprovince}}

No parameters are needed

Error-checking

Misuses are categorised in Category:Template DisestcatCanadaprovince on invalid page (population: 0)

See also