Difference between revisions of "Template:EstcatCountry/doc"
imported>Tom.Reding m (→top: +{{High-use|25977}}) |
imported>BrownHairedGirl (update for new syntax without year parameters) |
||
Line 3: | Line 3: | ||
== Usage == | == Usage == | ||
− | + | In September 2019, this template's syntax was changed to a new format which doesn't need year parameters. If used, they will now trigger an error message, and the page will be categorised in [[:Category:Errors reported by Template DisestcatCountry]] (population: {{PAGESINCATEGORY:Errors reported by Template DisestcatCountry}}) {{Purge page|''Purge page to update total''}} | |
− | |||
− | |||
− | |||
− | {{Purge page|''Purge page to update | ||
− | === | + | ===Syntax === |
'''<nowiki>{{</nowiki>EstcatCountry|''''' country [ | sort key [ | new name ]] ''}} | '''<nowiki>{{</nowiki>EstcatCountry|''''' country [ | sort key [ | new name ]] ''}} | ||
Line 18: | Line 14: | ||
'''<nowiki>{{</nowiki>EstcatCountry|Belgium<nowiki>}}</nowiki>''' | '''<nowiki>{{</nowiki>EstcatCountry|Belgium<nowiki>}}</nowiki>''' | ||
− | ==== | + | ====Change of country name==== |
The optional 5th parameter sort key can also be used to override the country name in the parent category, "Establishments in 'X' by year". | The optional 5th parameter sort key can also be used to override the country name in the parent category, "Establishments in 'X' by year". | ||
Line 32: | Line 28: | ||
The parent categories will be [[:Category:Establishments in Myanmar by year]], but still [[:Category:1900s establishments in Burma]]. | The parent categories will be [[:Category:Establishments in Myanmar by year]], but still [[:Category:1900s establishments in Burma]]. | ||
− | ==== | + | ====Suppressing parent category for decade==== |
The template normally adds the page into a parent for the decade. In cases where that decade category does not exist, and it would not be useful to create it because of the short duration or small number of categories for this country, append <code>|decadeparent=no</code> | The template normally adds the page into a parent for the decade. In cases where that decade category does not exist, and it would not be useful to create it because of the short duration or small number of categories for this country, append <code>|decadeparent=no</code> | ||
− | ==== | + | ====Disambiguation==== |
If the country name used in the category title is ambiguous, use the optional named '''dab''' parameter to link to the mainspace article about the country. | If the country name used in the category title is ambiguous, use the optional named '''dab''' parameter to link to the mainspace article about the country. | ||
Line 41: | Line 37: | ||
'''<nowiki>{{</nowiki>estcatCountry|Malaya|Malaya|dab=Malayan Union<nowiki>}}</nowiki>''' | '''<nowiki>{{</nowiki>estcatCountry|Malaya|Malaya|dab=Malayan Union<nowiki>}}</nowiki>''' | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Error checking == | == Error checking == |
Revision as of 18:50, 5 September 2019
![]() | This is a documentation subpage for Template:EstcatCountry. It contains usage information, categories and other content that is not part of the original template page. |
![]() | This template is used on approximately 27,000 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). |
Contents
Usage
In September 2019, this template's syntax was changed to a new format which doesn't need year parameters. If used, they will now trigger an error message, and the page will be categorised in Category:Errors reported by Template DisestcatCountry (population: 0) Purge page to update total
Syntax
{{EstcatCountry| country [ | sort key [ | new name ]] }}
- Examples
{{EstcatCountry|the United States|United States}}
{{EstcatCountry|Belgium}}
Change of country name
The optional 5th parameter sort key can also be used to override the country name in the parent category, "Establishments in 'X' by year".
This is useful where a country has changed its name, and the only parent category by year uses the new name.
This feature was introduced in September 2015. For more info, see Template talk:EstcatCountry.
As of August 2019[update], pages that use this parameter are in Category:EstcatCountry with newname parameter.
- Example
{{estcatCountryBurma|Burma|Myanmar}}
The parent categories will be Category:Establishments in Myanmar by year, but still Category:1900s establishments in Burma.
Suppressing parent category for decade
The template normally adds the page into a parent for the decade. In cases where that decade category does not exist, and it would not be useful to create it because of the short duration or small number of categories for this country, append |decadeparent=no
Disambiguation
If the country name used in the category title is ambiguous, use the optional named dab parameter to link to the mainspace article about the country.
- Example
{{estcatCountry|Malaya|Malaya|dab=Malayan Union}}
Error checking
Error messages are display if this template is used in a which is not named "Category:YYYY establishments in Foo"
These errors are tracked in two tracking categories:
- Category:EstcatCountry used in disestablishments category (Template:PAGESINCATEGORY pages) — where Template:EstcatCountry has been used in a "Category:YYYY disestablishments in Foo"
- Category:EstcatCountry used inappropriately (Template:PAGESINCATEGORY pages) — other misuses, including mis-spellings of "establishments"
See also
- Template:EstcatCountryDecade
- Template:EstcatCountryCentury
- Template:EstcatCountry2ndMillennium
- Template:EstcatCountry3rdMillennium
- Template:Estcatsubcountry (for subdivisions of countries, like states, provinces, departments; or regions of continents)
- Template:EstcatUSstate
- Template:DisestcatCountry