Difference between revisions of "Template:EstcatUSstateDecade"
Jump to navigation
Jump to search
imported>BrownHairedGirl (make parameterless, after testing Template:EstcatUSstateDecade/sandbox) |
imported>Jonesey95 (add comma for Category:Establishments in Washington, D.C., ...) |
||
| (One intermediate revision by one other user not shown) | |||
| Line 1: | Line 1: | ||
| − | <includeonly>{{Category other | + | <includeonly><!-- |
| + | -->{{Category other | ||
|<!-- | |<!-- | ||
# It is a category, so proceed | # It is a category, so proceed | ||
| Line 7: | Line 8: | ||
# Not a valid page | # 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.}}<!-- | -->{{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:Template EstcatUSstateDecade on invalid page]]<!-- |
-->|<!-- | -->|<!-- | ||
# A valid page | # A valid page | ||
| − | -->{{EstcatUSstateDecade/core | + | -->{{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}}<!-- | |
| − | + | -->|comma={{{comma|}}}<!-- | |
| + | -->}}<!-- | ||
-->}}<!-- | -->}}<!-- | ||
-->|<!-- | -->|<!-- | ||
# Not a category | # Not a category | ||
-->|{{Error|message=ERROR. [[Template:EstcatUSstateDecade]] is for use only on category pages}}<!-- | -->|{{Error|message=ERROR. [[Template:EstcatUSstateDecade]] is for use only on category pages}}<!-- | ||
| − | -->[[Category:Template EstcatUSstateDecade on invalid page]] | + | -->[[Category:Template EstcatUSstateDecade on invalid page]]<!-- |
| − | + | -->}}<!-- | |
| − | <!-- | + | --></includeonly><!-- |
| − | -->}}< | + | # Note {{CatAutoTOC}} needs to be available whether or not this template page has been transcluded |
| − | <!-- Add categories and interwikis to the /doc subpage, please, not here! --> | + | -->{{CatAutoTOC}}<!-- |
| + | --><noinclude><!-- Add categories and interwikis to the /doc subpage, please, not here! --> | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> | ||
Latest revision as of 15:05, 6 December 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. |