Template:Countries of the European Union/sandbox
Outermost regions: Azores [PT20] · Canary Islands [ESCN] · French Guiana [GF] · Guadeloupe [GP] · Madeira [PT30] · Martinique [MQ] · Mayotte [YT] · Réunion [RE] · Saint-Martin [MF] (FR)
Included territories with special status: Åland [AX] · Büsingen am Hochrhein [DEXBU] · Campione d'Italia [ITXCA] · Ceuta [ESCE] · Heligoland [DEXHE] · Livigno [ITXLI] · Melilla [ESML] · Mount Athos [EL69] · United Nations Buffer Zone in Cyprus [CYXUN]
Overseas countries and territories: Aruba [AW] · Caribbean Netherlands [BQ] · Clipperton Island [CP] · Curaçao [CW] · French Polynesia [PF] · French Southern and Antarctic Lands [TF] · Greenland [GL] · New Caledonia [NC] · Saint Barthélemy [BL] · Sint Maarten [SX] (NL) · Saint Pierre and Miquelon [PM] · Wallis and Futuna [WF]
Excluded territories by special provision: Faroe Islands [FO] · Northern Cyprus [CYXNO]
Candidate countries: Albania [AL] · Bosnia and Herzegovina [BA] · Moldova [MD] · Montenegro [ME] · North Macedonia [MK] · Serbia [RS] · Turkey [TR] · Ukraine [UA]
Former member countries or territories: Akrotiri and Dhekelia [UKXSB] · Algeria [DZ] · Anguilla [AI] · Bermuda [BM] · British Virgin Islands [VG] · Cayman Islands [KY] · Falkland Islands [FK] · Gibraltar [GI] · Guernsey [GG] · Isle of Man [IM] · Jersey [JE] · Montserrat [MS] · Pitcairn Islands [PN] · Saint Helena, Ascension and Tristan da Cunha [SH] · Turks and Caicos Islands [TC] · United Kingdom [UK]
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]{{Countries of the European Union|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.
{{Countries of the European Union/sandbox|prefix=:Category:}}
{{Countries of the European Union|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).
{{Countries of the European Union|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 |