Difference between revisions of "Template:DisestcatCanadaprovince"
Jump to navigation
Jump to search
imported>MusikAnimal m (Protected "Template:DisestcatCanadaprovince": High-risk template ([Edit=Require autoconfirmed or confirmed access] (indefinite) [Move=Require autoconfirmed or confirmed access] (indefinite))) |
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 "YYYY disestablishments in Foo" | |
− | + | -->{{#ifeq: {{#invoke:String|match|s={{PAGENAME}}|pattern=^%d%d%d%d disestablishments in .+$|start=1|match=1|plain=false |nomatch=%%nomatch%%}} |%%nomatch%%<!-- | |
− | + | -->|<!-- | |
− | + | # Not a valid page | |
− | + | -->{{Error|ERROR. [[Template:DisestcatCanadaprovince]] is for use only on pages with a title of the form "Category:YYYY disestablishments in Foo", where YYYY is a 4-digit year.}}<!-- | |
− | + | -->[[Category:Template DisestcatCanadaprovince on invalid page]] | |
− | + | -->|<!-- | |
− | [[Category: | + | # A valid page |
− | + | -->{{DisestcatCanadaprovince/core | |
− | </includeonly><noinclude> | + | | year={{#invoke:String|match|s={{PAGENAME}}|pattern=^%d%d%d%d|start=1|match=1|plain=false}}<!-- |
+ | -->| province={{#invoke:String|replace|source={{PAGENAME}}|pattern=^%d%d%d%d disestablishments in t?h?e? ?|replace=|count=1|plain=false}}<!-- | ||
+ | -->}}<!-- | ||
+ | -->}}<!-- | ||
+ | -->|<!-- | ||
+ | # Not a category | ||
+ | -->|{{Error|message=ERROR. [[Template:DisestcatCanadaprovince]] is for use only on category pages}}<!-- | ||
+ | -->[[Category:Template DisestcatCanadaprovince on invalid page]]<!-- | ||
+ | -->}}</includeonly><noinclude> | ||
<!-- Add categories and interwikis to the /doc subpage, please, not here! --> | <!-- Add categories and interwikis to the /doc subpage, please, not here! --> | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> |
Revision as of 05:43, 19 February 2019
Usage
{{DisestcatCanadaprovince}}
No parameters are needed
Error-checking
Misuses are categorised in Category:Template DisestcatCanadaprovince on invalid page (population: 0)
See also
- Template:DisestcatCanadaprovinceDecade
- Template:DisestcatCanadaprovinceCentury
- Template:EstcatCanadaprovince
The above documentation is transcluded from Template:DisestcatCanadaprovince/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |