Difference between revisions of "Template:EstcatCanadaprovinceDecade"
Jump to navigation
Jump to search
imported>BrownHairedGirl (use Portal:Canada) |
imported>BrownHairedGirl (make parameterless) |
||
Line 1: | Line 1: | ||
− | <includeonly>{{ | + | <includeonly>{{Category other |
− | + | |<!-- | |
− | + | # It is a category, so proceed | |
− | {{ | + | # First check that this page's title is of the format "YYY0s establishments in Foo" ... where Foo is a province or territory of Canada |
− | + | -->{{#ifeq: {{#invoke:String|match|s={{PAGENAME}}|pattern=^%d%d%d0s establishments in .+$|start=1|match=1|plain=false |nomatch=%%nomatch%%}} |%%nomatch%%<!-- | |
− | [[Category: | + | -->|<!-- |
− | [[Category: | + | # Not a valid page |
− | + | -->{{Error|ERROR. [[Template:EstcatCanadaprovinceDecade]] is for use only on pages with a title of the form "Category:YYY0s establishments in Foo", where YYY0s is a 4-digit decade and Foo is a province or territory of Canada.}}<!-- | |
− | + | -->[[Category:Template EstcatCanadaprovinceDecade province on invalid page]] | |
− | + | -->|<!-- | |
− | </includeonly><noinclude> | + | # A valid page |
+ | -->{{EstcatCanadaprovinceDecade/core | ||
+ | | decade={{#invoke:String|match|s={{PAGENAME}}|pattern=^%d%d%d0|start=1|match=1|plain=false}}<!-- | ||
+ | -->| province={{#invoke:String|replace|source={{PAGENAME}}|pattern=^%d%d%d0s establishments in t?h?e? ?|replace=|count=1|plain=false}}<!-- | ||
+ | -->}}<!-- | ||
+ | -->}}<!-- | ||
+ | -->|<!-- | ||
+ | # Not a category | ||
+ | -->|{{Error|message=ERROR. [[Template:EstcatCanadaprovinceDecade]] is for use only on category pages}}<!-- | ||
+ | -->[[Category:Template EstcatCanadaprovinceDecade on invalid page]]<!-- | ||
+ | -->}}</includeonly><noinclude> | ||
+ | <!-- Add categories and interwikis to the /doc subpage, please, not here! --> | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> |
Revision as of 20:26, 28 September 2019
Creates a category for establishments in a given decade in a province or territory of Canada, e.g. Category:1920s establishments in Alberta or Category:2000s establishments in Yukon
Usage
{{EstcatCanadaprovinceDecade}}
No parameters are needed.
See also
- Template:EstcatCanadaprovince
- Template:EstcatCanadaprovinceCentury
- Template:DisestcatCanadaprovinceDecade
The above documentation is transcluded from Template:EstcatCanadaprovinceDecade/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |