Difference between revisions of "Template:DisestcatUSstate"

From blackwiki
Jump to navigation Jump to search
imported>BrownHairedGirl
(sort key for Category:YYYY in statename = "/Disestablishments")
imported>BrownHairedGirl
({{CatAutoTOC}})
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly>{{Portal|{{#ifexist: Portal:{{{3}}}|{{{3}}}}}|Years|{{#invoke: FindYDCportal | findydcportal | {{{1|}}}0s }} }}
+
<includeonly>{{Category other
Organizations, places or other things disestablished in '''[[{{{3}}}]]''' in the year '''[[{{{1}}}{{{2}}}]]'''.
+
    |<!--
 
+
      # It is a category, so proceed
{| class="toccolours" style="margin:1em auto;"
+
      # First check that this page's title is of the format "YYYY disestablishments in Foo"
|{{LinkCatIfExists2|{{{1}}}0s disestablishments in {{{3}}}|{{{1}}}0s disestablishments in {{{3}}}}}:  
+
    -->{{#ifeq: {{#invoke:String|match|s={{PAGENAME}}|pattern=^%d%d%d%d disestablishments in .+$|start=1|match=1|plain=false |nomatch=%%nomatch%%}} |%%nomatch%%<!--
|{{LinkCatIfExists2|{{#expr: {{{1}}}0 - 1}} disestablishments in {{{3}}}|&larr;}} {{LinkCatIfExists2|{{{1}}}0 disestablishments in {{{3}}}|{{{1}}}0}} • {{LinkCatIfExists2|{{{1}}}1 disestablishments in {{{3}}}|{{{1}}}1}} • {{LinkCatIfExists2|{{{1}}}2 disestablishments in {{{3}}}|{{{1}}}2}} • {{LinkCatIfExists2|{{{1}}}3 disestablishments in {{{3}}}|{{{1}}}3}} • {{LinkCatIfExists2|{{{1}}}4 disestablishments in {{{3}}}|{{{1}}}4}} • {{LinkCatIfExists2|{{{1}}}5 disestablishments in {{{3}}}|{{{1}}}5}} • {{LinkCatIfExists2|{{{1}}}6 disestablishments in {{{3}}}|{{{1}}}6}} • {{LinkCatIfExists2|{{{1}}}7 disestablishments in {{{3}}}|{{{1}}}7}} • {{LinkCatIfExists2|{{{1}}}8 disestablishments in {{{3}}}|{{{1}}}8}} • {{LinkCatIfExists2|{{{1}}}9 disestablishments in {{{3}}}|{{{1}}}9}} {{LinkCatIfExists2|{{#expr: {{{1}}}9 + 1}} disestablishments in {{{3}}}|&rarr;}}
+
      -->|<!--
|}
+
              # Not a valid page
 
+
          -->{{Error|ERROR. [[Template:DisestcatUSstate]] 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 see also if exists 2|{{{1}}}{{{2}}} establishments in {{{3}}}|{{{1}}}0s establishments in {{{3}}}}}
+
          -->[[Category:Template DisestcatUSstate on invalid page]]
 
+
      -->|<!--
[[Category:{{{1}}}0s disestablishments in {{{3}}}]]
+
              # A valid page
{{#ifexpr: {{{1}}} < 100 | [[Category:Disestablishments in {{{3}}} by year|0{{{1}}}]] | [[Category:Disestablishments in {{{3}}} by year]]}}
+
          -->{{DisestcatUSstate/core
[[Category:{{{1}}}{{{2}}} in {{{3}}}|/Disestablishments]]
+
                | year={{#invoke:String|match|s={{PAGENAME}}|pattern=^%d%d%d%d|start=1|match=1|plain=false}}<!--
[[Category:{{{1}}}{{{2}}} disestablishments in the United States|{{{3}}}]]</includeonly><!--
+
              -->| state={{#invoke:String|replace|source={{PAGENAME}}|pattern=^%d%d%d%d disestablishments in |replace=|count=1|plain=false}}<!--
# Note {{YearParamUsageCheck}} needs to be available whether or not this template page has been transcluded
+
          -->}}</includeonly>{{CatAutoTOC}}<includeonly><!--
-->{{YearParamUsageCheck
+
    -->}}<!--
| yearparam    = {{{1}}}{{{2}}}
+
-->|<!--
| templatename = DisestcatUSstate
+
    # Not a category
}}<noinclude>
+
  -->|{{Error|message=ERROR.  [[Template:DisestcatUSstate]] is for use only on category pages}}<!--
 
+
  -->[[Category:Template DisestcatUSstate 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>

Latest revision as of 10:18, 1 April 2019

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

This template is a modified version of Template:EstcatUSstate

Usage

{{DisestcatUSstate}}

Needs no parameters

See also