Difference between revisions of "Template:(Dis)estcatIndiastateCentury"

From blackwiki
Jump to navigation Jump to search
blackwiki>Fayenatic london
 
blackwiki>Fayenatic london
m (correction)
Line 9: Line 9:
 
             -->|0|<!--
 
             -->|0|<!--
 
               # Not a valid page
 
               # Not a valid page
               -->{{Error|ERROR. [[Template:(Dis)estCatIndiastateCentury]] is for use only on pages with a title of the form "Category:YYth-century establishments in Foo" or "Category:YYth-century disestablishments in Foo", where YY is a 2-digit century and "Foo" is a state of the United States.}}<!--
+
               -->{{Error|ERROR. [[Template:(Dis)estcatIndiastateCentury]] is for use only on pages with a title of the form "Category:YYth-century establishments in Foo" or "Category:YYth-century disestablishments in Foo", where YY is a 2-digit century and "Foo" is a state of the United States.}}<!--
               -->[[Category:Template (Dis)estCatIndiastateCentury on invalid page]]<!--
+
               -->[[Category:Template (Dis)estcatIndiastateCentury on invalid page]]<!--
 
             -->|<!--
 
             -->|<!--
 
               # A valid page
 
               # A valid page
               -->{{(Dis)estCatIndiastateCentury/core<!--
+
               -->{{(Dis)estcatIndiastateCentury/core<!--
 
                   -->|centurynum={{#invoke:String|replace|source={{PAGENAME}}|pattern=^(%d%d)[snrt][tdh].century d?i?s?establishments in %a.+$|replace=%1|start=1|match=1|plain=false}}<!--
 
                   -->|centurynum={{#invoke:String|replace|source={{PAGENAME}}|pattern=^(%d%d)[snrt][tdh].century d?i?s?establishments in %a.+$|replace=%1|start=1|match=1|plain=false}}<!--
 
                   -->|MC={{#expr: {{#invoke:String|replace|source={{PAGENAME}}|pattern=^(%d%d)[snrt][tdh].century d?i?s?establishments in %a.+$|replace=%1|start=1|match=1|plain=false}} - 1}}<!--
 
                   -->|MC={{#expr: {{#invoke:String|replace|source={{PAGENAME}}|pattern=^(%d%d)[snrt][tdh].century d?i?s?establishments in %a.+$|replace=%1|start=1|match=1|plain=false}} - 1}}<!--
Line 22: Line 22:
 
  -->|<!--
 
  -->|<!--
 
     # Not a category
 
     # Not a category
   -->{{Error|message=ERROR.  [[Template:(Dis)estCatIndiastateCentury]] is for use only on category pages}}<!--
+
   -->{{Error|message=ERROR.  [[Template:(Dis)estcatIndiastateCentury]] is for use only on category pages}}<!--
   -->[[Category:Template (Dis)estCatIndiastateCentury on invalid page]]<!--
+
   -->[[Category:Template (Dis)estcatIndiastateCentury on invalid page]]<!--
 
-->}}</includeonly><!--
 
-->}}</includeonly><!--
 
  # Note {{CatAutoTOC}} needs to be available whether or not this template page has been transcluded
 
  # Note {{CatAutoTOC}} needs to be available whether or not this template page has been transcluded

Revision as of 11:01, 21 September 2020

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

Creates a category of the form "YYth-century establishments in Foo" or "YYth-century disestablishments in Foo", where "YY" is a 2-digit century, and "Foo" is a state or territory of India.

The template detects whether this is an "establishments" or "disestablishments" category, and adjusts accordingly.

Usage

{{(Dis)estcatIndiastateCentury}}

No parameters are needed.