Difference between revisions of "Template:EstcatUSstateDecade"
Jump to navigation
Jump to search
imported>BrownHairedGirl (Category:United States category header templates moved to /doc) |
imported>BrownHairedGirl (make parameterless, after testing Template:EstcatUSstateDecade/sandbox) |
||
| 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" | |
| − | + | -->{{#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:EstcatUSstateDecade]] is for use only on pages with a title of the form "Category:YYY0s establishments in Foo", where YYY0s is a 4-digit decade.}}<!-- | |
| − | [[ | + | -->[[Category:Template EstcatUSstateDecade on invalid page]] |
| − | [[Category: | + | -->|<!-- |
| − | [[Category: | + | # A valid page |
| − | </includeonly><noinclude> | + | -->{{EstcatUSstateDecade/core |
| + | | decade={{#invoke:String|replace|source={{PAGENAME}}|pattern=^(%d%d%d0)s .+$|replace=%1|start=1|match=1|plain=false}}<!-- | ||
| + | -->| state={{#invoke:String|replace|source={{PAGENAME}}|pattern=^%d%d%d0s establishments in |replace=|count=1|plain=false}}<!-- | ||
| + | -->}}</includeonly>{{CatAutoTOC}}<includeonly><!-- | ||
| + | -->}}<!-- | ||
| + | -->|<!-- | ||
| + | # Not a category | ||
| + | -->|{{Error|message=ERROR. [[Template:EstcatUSstateDecade]] is for use only on category pages}}<!-- | ||
| + | -->[[Category:Template EstcatUSstateDecade on invalid page]] | ||
| + | [[Category:United States category header templates]] | ||
| + | <!-- | ||
| + | -->}}</includeonly><noinclude> | ||
| + | <!-- Add categories and interwikis to the /doc subpage, please, not here! --> | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> | ||
Revision as of 12:58, 1 March 2020
This template is a modified version of Template:EstcatCountryDecade.
Usage
{{EstcatUSstateDecade}}
No parameters needed
See also
| The above documentation is transcluded from Template:EstcatUSstateDecade/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. |