Template:Establishment category in country/doc: Difference between revisions
→Change of country name: link to category, thanks user:BrownHairedGirl |
changeover |
||
Line 1: | Line 1: | ||
{{Documentation subpage}} |
{{Documentation subpage}} |
||
== Usage == |
== Usage == |
||
This template's syntax is being changed to a new format which doesn't need year parameters. While the changeover is underway, both and new forms are supported. |
|||
===New syntax === |
|||
'''<nowiki>{{</nowiki>EstcatCountry|''''' country [ | sort key [ | new name ]] ''}} |
|||
;Examples |
|||
'''<nowiki>{{</nowiki>EstcatCountry|the United States|United States<nowiki>}}</nowiki>''' |
|||
'''<nowiki>{{</nowiki>EstcatCountry|Belgium<nowiki>}}</nowiki>''' |
|||
====New syntax: 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}}, pages that use this parameter are in [[:Category:EstcatCountry with newname parameter]]. |
|||
; Example |
|||
'''<nowiki>{{</nowiki>estcatCountryBurma|Burma|Myanmar<nowiki>}}</nowiki>''' |
|||
The parent categories will be [[:Category:Establishments in Myanmar by year]], but still [[:Category:1900s establishments in Burma]]. |
|||
====New syntax: 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> |
|||
====New syntax: 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 |
|||
'''<nowiki>{{</nowiki>estcatCountry|Malaya|Malaya|dab=Malayan Union<nowiki>}}</nowiki>''' |
|||
===Old syntax === |
|||
'''<nowiki>{{</nowiki>EstcatCountry|''''' YYY | Y | country [ | sort key [ | new name ]] ''}} |
'''<nowiki>{{</nowiki>EstcatCountry|''''' YYY | Y | country [ | sort key [ | new name ]] ''}} |
||
Line 9: | Line 44: | ||
'''<nowiki>{{</nowiki>EstcatCountry|200|7|Belgium<nowiki>}}</nowiki>''' |
'''<nowiki>{{</nowiki>EstcatCountry|200|7|Belgium<nowiki>}}</nowiki>''' |
||
===Change of country name=== |
====Old syntax: 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 23: | Line 58: | ||
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=== |
====Old syntax: 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=== |
====Old syntax: 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. |
||
Revision as of 19:47, 31 August 2019
This is a documentation subpage for Template:Establishment category in country. It may contain usage information, categories and other content that is not part of the original template page. |
Usage
This template's syntax is being changed to a new format which doesn't need year parameters. While the changeover is underway, both and new forms are supported.
New syntax
{{EstcatCountry| country [ | sort key [ | new name ]] }}
- Examples
{{EstcatCountry|the United States|United States}}
{{EstcatCountry|Belgium}}
New syntax: 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.
New syntax: 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
New syntax: 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}}
Old syntax
{{EstcatCountry| YYY | Y | country [ | sort key [ | new name ]] }}
- Examples
{{EstcatCountry|199|3|the United States|United States}}
{{EstcatCountry|200|7|Belgium}}
Old syntax: 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
{{estcatCountry|190|6|Burma|Burma|Myanmar}}
The parent categories will be Category:Establishments in Myanmar by year, but still Category:1900s establishments in Burma.
Old syntax: 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
Old syntax: 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|194|7|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 (0 pages) — where Template:EstcatCountry has been used in a "Category:YYYY disestablishments in Foo"
- Category:EstcatCountry used inappropriately (0 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