Difference between revisions of "Template:EstcatUSstateDecade"

From blackwiki
Jump to navigation Jump to search
imported>BrownHairedGirl
imported>BrownHairedGirl
(make parameterless, after testing Template:EstcatUSstateDecade/sandbox)
Line 1: Line 1:
<includeonly>{{Portal|{{#ifexist: Portal:{{{4}}}|{{{4}}}}}|United States|{{#invoke: FindYDCportal | findydcportal |{{{1}}}{{{2}}}0s }} }}
+
<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
{{Navseasoncats}}
+
      # First check that this page's title is of the format "YYY0s establishments in Foo"
 
+
    -->{{#ifeq: {{#invoke:String|match|s={{PAGENAME}}|pattern=^%d%d%d0s establishments in .+$|start=1|match=1|plain=false |nomatch=%%nomatch%%}} |%%nomatch%%<!--
{{Category see also if exists|{{{1}}}{{{2}}}0s disestablishments in {{{4}}}}}
+
      -->|<!--
 
+
              # Not a valid page
[[Category:{{{3}}}-century establishments in {{{4}}}|{{PAGENAME}}]]
+
          -->{{Error|ERROR. [[Template:EstcatUSstateDecade]] is for use only on pages with a title of the form "Category:YYY0s establishments in Foo", where YYY0s is a 4-digit decade.}}<!--
[[Category:Establishments in {{{4}}} by decade]]
+
          -->[[Category:Template EstcatUSstateDecade on invalid page]]
[[Category:{{{1}}}{{{2}}}0s in {{{4}}}|/Establishments]]
+
      -->|<!--
[[Category:{{{1}}}{{{2}}}0s establishments in the United States|{{{4}}}]]
+
              # A valid page
</includeonly><noinclude>
+
          -->{{EstcatUSstateDecade/core
 +
                | decade={{#invoke:String|replace|source={{PAGENAME}}|pattern=^(%d%d%d0)s .+$|replace=%1|start=1|match=1|plain=false}}<!--
 +
              -->| state={{#invoke:String|replace|source={{PAGENAME}}|pattern=^%d%d%d0s establishments in |replace=|count=1|plain=false}}<!--
 +
          -->}}</includeonly>{{CatAutoTOC}}<includeonly><!--
 +
    -->}}<!--
 +
-->|<!--
 +
    # Not a category
 +
  -->|{{Error|message=ERROR.  [[Template:EstcatUSstateDecade]] is for use only on category pages}}<!--
 +
  -->[[Category:Template EstcatUSstateDecade 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 12:58, 1 March 2020