Template:Browse/CountryCard
Template page
More actions
Usage
Card template fed by SMW format=template queries on the Browse by country page. Iterates country pages and renders one card per country.
Receives two positional parameters from SMW:
{{{1}}}— country page name (mainlabel){{{2}}}— bare image filename from?Has image=imageprintout. Empty if no image set.
Card click target is the country browse subpage at Browse by country/{Country}, not the main country article. The browse subpage shows the accession listing and links back to the main article from its own top nav.
Outer #ask query needs link=none so values arrive as bare text rather than wikilink-formatted strings.
Image is requested at 1024px width for retina sharpness; CSS scales it to fill the 16:10 container via object-fit: cover. Cards for countries without Has image show the placeholder colour.
Template wikitext is on a single line by design.
Calling query
{{#ask:[[Category:Countries]]
|?Has image=image
|format=template
|template=Browse/CountryCard
|sort=
|limit=200
|link=none
|searchlabel=
}}