Difference between revisions of "Template:DisestcatUSstateDecade"

From blackwiki
Jump to navigation Jump to search
imported>BrownHairedGirl
({{Navseasoncats}})
imported>BrownHairedGirl
(make parameterless, after testing in Template:DisestcatUSstateDecade/sandbox)
Line 1: Line 1:
<includeonly>{{Portal<!--
+
<includeonly>{{Category other
  -->|{{#ifexist: Portal:{{{4}}}|{{{4}}}}}|{{#invoke: FindYDCportal | findydcportal | {{{1}}}{{{2}}}0s }}<!--
+
    |<!--
  -->|United States<!--
+
      # It is a category, so proceed
  -->|History<!--
+
      # First check that this page's title is of the format "YYY0s disestablishments in Foo"
-->}}
+
    -->{{#ifeq: {{#invoke:String|match|s={{PAGENAME}}|pattern=^%d%d%d0s disestablishments in .+$|start=1|match=1|plain=false |nomatch=%%nomatch%%}} |%%nomatch%%<!--
Organizations, places or other things disestablished in '''[[{{{4}}}]]''' in the '''[[{{{1}}}{{#ifeq:{{{2}}} | 0 | {{{2}}}0–{{{1}}}{{{2}}}9{{!}}{{{1}}}}}{{{2}}}0s]]'''.
+
      -->|<!--
 
+
              # Not a valid page
{{Navseasoncats}}
+
          -->{{Error|ERROR. [[Template:DisestcatUSstateDecade]] is for use only on pages with a title of the form "Category:YYY0s disestablishments in Foo", where YYY0s is a 4-digit decade.}}<!--
 
+
          -->[[Category:Template DisestcatUSstateDecade on invalid page]]
{{Category see also if exists|{{{1}}}{{{2}}}0s establishments in {{{4}}}}}
+
      -->|<!--
 
+
              # A valid page
[[Category:{{{3}}}-century disestablishments in {{{4}}}|{{PAGENAME}}]]
+
          -->{{DisestcatUSstateDecade/core
[[Category:Disestablishments in {{{4}}} by decade]]
+
                | decade={{#invoke:String|replace|source={{PAGENAME}}|pattern=^(%d%d%d0)s .+$|replace=%1|start=1|match=1|plain=false}}<!--
[[Category:{{{1}}}{{{2}}}0s in {{{4}}}|/Disestablishments]]
+
              -->| state={{#invoke:String|replace|source={{PAGENAME}}|pattern=^%d%d%d0s disestablishments in |replace=|count=1|plain=false}}<!--
[[Category:{{{1}}}{{{2}}}0s disestablishments in the United States|{{{4}}}]]</includeonly>
+
          -->}}</includeonly>{{CatAutoTOC}}<includeonly><!--
<noinclude>
+
    -->}}<!--
 +
-->|<!--
 +
    # Not a category
 +
  -->|{{Error|message=ERROR.  [[Template:DisestcatUSstateDecade]] is for use only on category pages}}<!--
 +
  -->[[Category:Template DisestcatUSstateDecade on invalid page]]
 +
[[Category:United States category header templates]]
 +
<!--
 +
-->}}</includeonly><noinclude>
 +
<!-- Add categories and interwikis to the /doc subpage, please, not here! -->  
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 20:26, 1 March 2020