Template:Countries of the European Union/testcases

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
It may be necessary to purge this page to see the current results.
You can see all test cases in this page rendered in other user languages, by appending ?uselang= and a language code to its URL:
bg (български) · cs (čeština) · da (dansk) · de (Deutsch) · el (English) · en (English) · es (English) · et (eesti) · fi (suomi) · fr (français) · ga (Gaeilge) · hr (hrvatski) · hu (magyar) · it (italiano) · lt (lietuvių) · lv (latviešu) · mt (Malti) · nl (Nederlands) · pt (português) · pl (polski) · sk (slovenčina) · sl (slovenščina) · sv (svenska) · qqq (used in MediaWiki to test translations)

Examples test cases[edit]

  • {{Countries of the European Union|prefix=:Category:Maps of}}

{{Countries of the European Union|prefix=:Category:Maps of}

  • {{Countries of the European Union|prefix=:Category:Churches in|suffix=by architectural style|showcode=yes}}
    Note that if no country or territory have an existing page matching the indicated prefix and suffix, there are no useful section to display, so the container box is also removed and the template returns an empty text (e.g. for the first line of code given above, you can see that this empty text is immediately followed, after a newline in the wikitext, by the second box; the empty line does not generate an empty paragraph if both templates are glued without any separating newline, or if this newline between templates is "masked" by enclosing it in HTML comments).
    Note also that extra sections for territories with special status or limited recognition are dropped (the section title and other separators between sections) if there's still no such territory with an existing page matching the indicated prefix and suffix.
    In this example, the |showcode=yes parameter allows displaying the country code (as defined in the data module) after each linked label.
  • {{Countries of the European Union|prefix=:Category:Maps of}}
    This would generate only link to an existing Category:Maps of the United Kingdom, before testing the existence of Category:Maps of United Kingdom, and then display nothing if neither of these exist.
    The displayed labels are translated and sorted in the user's language, and don't show the conditional leading article "the" (used on Commons for page names most frequently in English).
  • {{Countries of the European Union|prefix=:Category:Maps of|all=yes}}
    This would generate all possible links, such as Category:Maps of the United Kingdom, and Category:Maps of United Kingdom without testing their existence.
    The displayed labels are untranslated, shown and sorted in by their preferred name on Commons and show all possible variable parts (main names or alternate names used in Commons, with or without articles). The order of preference (when there are several alternative names listed, separated by '|') is the same order used to test the existence of pages when the |all= parameter is empty or missing.
  • {{Countries of the European Union|prefix=:Category:Euro coins (|suffix=)|sep=}}
    The explicitly empty |sep= parameter drops the default space separator, normally added after the constant prefix and before the constant suffix, but undesired in the parentheses.
    This would not generate links such as Category:Euro coins (the United Kingdom) or Category:Euro coins (United Kingdom), currently unused.
    The displayed labels are translated and sorted in the user's language, and don't show the conditional leading article "the" (used on Commons for page names most frequently in English).
  • {{Countries of the European Union|prefix=:Category:Euro coins (|suffix=)|sep=|all=1}}
    This would generate all possible links, including Category:Euro coins (the United Kingdom) or Category:Euro coins (United Kingdom), without testing their existence
    The displayed labels are untranslated, shown and sorted in by their preferred name on Commons and show all possible variable parts (main names or alternate names used in Commons, with or without articles). The order of preference (when there are several alternative names listed, separated by '|') is the same order used to test the existence of pages when the |all= parameter is empty or missing.

Compare results between the main and sandbox templates[edit]

{{Countries of the European Union}}
{{Countries of the European Union|prefix=:Category:}}
{{Countries of the European Union|prefix=:Category:Euro coins (|suffix=)|sep=}}
With the main template
With the sandbox template