Template:Browse/AppellationCard
More actions
Usage
Card template fed by SMW format=template queries on the Browse by appellation page. Renders one card per appellation that at least one accession names in Has appellation.
Receives two positional parameters from SMW:
{{{1}}}— appellation page name including the(appellation)suffix (mainlabel){{{2}}}— bare image filename from?Has image=imageprintout. Empty if no image set.
The card title and the overlay link text show the bare name; Module:Appellation strips the (appellation) suffix. The click target is the appellation browse subpage at Browse by appellation/{Appellation} (appellation), not the main appellation article. The subpage shows the accession listing and links the main article from its own lead when that article exists.
If the subpage has not been created, the card falls back to a Special:Ask listing of that appellation's accessions, so an appellation that arrives with a new accession batch never leads to an edit form. The #ifexist check also records the missing subpage in Special:WantedPages. To fill the gap, create Browse by appellation/{Appellation} (appellation) containing {{Browse/AppellationSubpage|appellation={Appellation} (appellation)}}.
The count label uses PLURAL, so an appellation with one accession reads "1 accession".
The line under the title names the growing area or areas of the appellation's accessions (the inverse of Has growing area over those accessions).
Outer #ask query needs link=none so values arrive as bare text rather than wikilink-formatted strings.
The overlay link text is the appellation name. CSS hides it visually; screen readers announce it.
Image is requested at 1024px width for retina sharpness; CSS scales it to fill the 16:10 container. The image comes from the appellation article's Has image. Cards for appellations without an article, or whose article has no image, show the placeholder colour.
Template wikitext is on a single line by design.
Calling query
The query takes the inverse of Has appellation over the accessions, so the grid lists exactly the appellations that have accessions, whether or not the appellation article exists yet. Template:Accession stores the value as the appellation page title.
{{#ask:[[-Has appellation::<q>[[Category:Accessions]]</q>]]
|?Has image=image
|format=template
|template=Browse/AppellationCard
|sort=
|limit=500
|link=none
|searchlabel=
}}