Difference between revisions of "Template:EstcatCanadaprovinceDecade"
Jump to navigation
Jump to search
imported>Fayenatic london ({{YearInCountryPortalBox}}) |
imported>BrownHairedGirl (fix my bad) |
||
(4 intermediate revisions by 2 users not shown) | |||
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%%<!-- | ||
+ | -->|<!-- | ||
+ | # 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]] | ||
+ | -->|<!-- | ||
+ | # 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><!-- | ||
+ | # Note {{CatAutoTOC}} needs to be available whether or not this template page has been transcluded | ||
+ | -->{{CatAutoTOC}}<!-- | ||
+ | --><noinclude><!-- | ||
+ | -->{{Documentation}} | ||
+ | <!-- Add categories and interwikis to the /doc subpage, please, not here! --> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</noinclude> | </noinclude> |
Latest revision as of 06:19, 19 March 2020
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. |