Template:Olympic teams/sandbox
Special teams: Australasia [ANZ] (1908–1912) · Korea [COR] (2018)
Former teams: Belarus [BLR] (1994–2022) · Bohemia [BOH] (1900–1912) · Czechoslovakia [TCH] (1920–1992) · Dominion of Ceylon [CEY] (1948–1964, 1972) · Federation of Malaya [MAL] (1960–1988) · French Dahomey [DAH] (1972) · German Democratic Republic [GDR] (1972–1988) · Gold Coast Colony [GHA0] (1952) · Khmer Republic [KHM] (1972) · Netherlands Antilles [AHO] (1952–2008) · North Borneo [NBO] (1956) · Republic of China at the Olympics [ROC1] (1972–1976) · Russia [RUS] (1994–2016) · Russian Empire [RU1] (1900–1912) · Saar Protectorate [SAA] (1952) · South Yemen [YMD] (1988) · Soviet Union [URS] (1952–1988) · West Germany [FRG] (1968–1988) · Yugoslavia [YUG] (1920–1992) · Zaire [ZAI] (1984–1996)
This documentation is transcluded from Template:Countries of Africa/doc.
Displays a navigation box with links to similar galleries or categories for every country in a region. Links to existing pages are displayed using country names in the current user's language. Country names are obtained from Wikidata. If the name of a country is incorrect, find the country in this list and use the link in the Item column to check what changes have occurred at Wikidata.
Usage
[edit]{{Olympic teams|prefix=:Namespace:Prefix text|suffix=suffix text}}
Template parameters
[edit]Parameter | Description | Default | Status |
---|---|---|---|
prefix |
Text inserted before the English country name for each link. | empty | optional |
suffix |
Text added after the English country name for each link. | empty | optional |
sep |
Separator between prefix and name, and between name and suffix. | space | optional |
simple |
For some templates, |simple=yes simplifies the output, omitting some sections (e.g. for smaller or special territories, but possibly adding some of them in another displayed section). |
empty | optional |
showcode |
Use |showcode=yes to also display the country/territory code (between square brackets) after each linked label. The codes displayed are those defined in the data module. |
empty | optional |
all |
Use |all=yes for a temporary test to show all links without testing for their existence; will show red links. |
empty | optional |
nocat |
Use |nocat=yes for a demonstration where a template with invalid parameters should not output a tracking category. |
empty | optional |
Templates and country data
[edit]The following templates are implemented by Module:Countries:
For example, {{Countries of Africa}} contains:
{{#invoke:Countries|main|Africa}}
The parameter Africa
means data from Module:Countries/Africa is used. Changes to the countries or the text displayed are made in the data module.
Before updating the main data module, changes should be made in the sandbox data module and tested with the sandbox template:
For example {{Countries of Africa/sandbox}} just contains:
{{#invoke:Countries/sandbox|main|Africa}}
And it uses the sandbox version of the associated data module, used by Module:Countries/sandbox (which is the sandbox version of Module:Countries).
Displaying the sandbox version of a template also allows testing changes in Module:Countries, without modifying the template or its associated data module (which don't need to be changed in their sandbox version).
The following two examples below allow testing changes made in the sandbox before applying working modifications to the normal version. This should work as intended and will finally display the same thing between the normal and sandbox versions of the template (and of their associated data module) once these versions are synchronized.
{{Olympic teams/sandbox|prefix=:Category:}}
{{Olympic teams|prefix=:Category:}}
See more examples in the testcases listed above for the normal version with their rendering to compare the results in the sandbox version.
Errors
[edit]If an invalid parameter is used, an error message is displayed when an edit to the page is previewed. If a page with an error is saved, no message is displayed but the page is added to a hidden error tracking category: Category:Countries template with invalid parameters.
For example the following code misspells the expected suffix
parameter (For this demonstration, no tracking category is added because |nocat=yes
is used).
{{Olympic teams|prefix=:Category:Maps of|sufix=by region|nocat=yes}}
Previewing an edit on any category or gallery page, with such code added (not on this documentation page!) shows the result and the following message Error: invalid parameter "|sufix=by region" will appear. You can fix it by editing the code in your edited page.
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
prefix | prefix | Text inserted before the English country name for each link. | Line | optional |
suffix | suffix | Text added after the English country name for each link. | Line | optional |
sep | sep | Separator between prefix and name, and between name and suffix. | Line | optional |
simple | simple | For some templates, simple=yes simplifies the output, omitting some sections (e.g. for smaller or special territories, but possibly adding some of them in another displayed section). | Line | optional |
showcode | showcode | Use showcode=yes to also display the country/territory code (between square brackets) after each linked label. The codes displayed are those defined in the data module. | Line | optional |
all | all | Use all=yes for a temporary test to show all links without testing for their existence; will show red links. | Line | optional |
nocat | nocat | Use nocat=yes for a demonstration where a template with invalid parameters should not output a tracking category. | Line | optional |