Difference between revisions of "Template:DisestcatUSstate"
Jump to navigation
Jump to search
imported>BrownHairedGirl (sort key for Category:YYYY in statename = "/Disestablishments") |
imported>BrownHairedGirl ({{CatAutoTOC}}) |
||
| (One intermediate revision by the same user 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 "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:DisestcatUSstate]] 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 DisestcatUSstate on invalid page]] | |
| − | + | -->|<!-- | |
| − | + | # A valid page | |
| − | + | -->{{DisestcatUSstate/core | |
| − | [[Category: | + | | year={{#invoke:String|match|s={{PAGENAME}}|pattern=^%d%d%d%d|start=1|match=1|plain=false}}<!-- |
| − | + | -->| state={{#invoke:String|replace|source={{PAGENAME}}|pattern=^%d%d%d%d disestablishments in |replace=|count=1|plain=false}}<!-- | |
| − | + | -->}}</includeonly>{{CatAutoTOC}}<includeonly><!-- | |
| − | --> | + | -->}}<!-- |
| − | + | -->|<!-- | |
| − | + | # Not a category | |
| − | }}<noinclude> | + | -->|{{Error|message=ERROR. [[Template:DisestcatUSstate]] is for use only on category pages}}<!-- |
| − | + | -->[[Category:Template DisestcatUSstate 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> | ||
Latest revision as of 10:18, 1 April 2019
| This template is used on approximately 4,400 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
Transclusion count updated automatically (see documentation). |
This template is a modified version of Template:EstcatUSstate
Usage
{{DisestcatUSstate}}
Needs no parameters
See also
| The above documentation is transcluded from Template:DisestcatUSstate/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |