Template:CardLangVersionImage
Werothegreat (Talk | contribs) |
|||
(10 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | {{#ifexist:File:{{PAGENAME}}{{{1|}}}.jpg|[[File:{{PAGENAME}}{{{1|}}}.jpg|100px|{{{2|{{{1| | + | <includeonly>{{#ifexist:File:{{{n|{{PAGENAME}}}}}{{#if:{{{d|}}}|Digital|}}{{{1|}}}{{#if:{{{o|}}}|Old{{#ifeq:{{{o|}}}|1||{{{o|}}}}}|}}.jpg|[[File:{{{n|{{PAGENAME}}}}}{{#if:{{{d|}}}|Digital|}}{{{1|}}}{{#if:{{{o|}}}|Old{{#ifeq:{{{o|}}}|1||{{{o|}}}}}|}}.jpg|100px|{{#if:{{{2|}}}|{{{2}}}|{{#if:{{{1|}}}|{{{1|}}} language }}{{{n|{{PAGENAME}}}}} {{#switch:{{lc:{{{d|}}}}}|0|g=from Goko/Making Fun|1|s=from Shuffle iT|2|t=from Temple Gates Games}}}}]]}}</includeonly><noinclude> |
+ | {{doc}} | ||
+ | </noinclude> |
Latest revision as of 13:45, 27 July 2022
Template documentation [edit]
This template is meant to be used on a card's page, and uses the {{PAGENAME}} template to determine the card's name. This can be overridden; see below.
Usage:
{{CardLangVersionImage|language|description|d=?|o=?|n=?}}
language and description parameters are not named, and are ordered.
For this to work, files should be named as follows: [card name][Digital][language][Old[X]].jpg where parts in italics are optional, for example: Prince.jpg WitchDigital.jpg MoatGermanOld.jpg CopperOld2.jpg BasilicaDigitalGermanOld.jpg
The first parameter (language) is any string that will be appended to card's base name, for example:
{{CardLangVersionImage|German}}
on Witch page will produce:
Omitting the first parameter (language) will produce the English card preview.
The second parameter is the description displayed in a hint when a user moves mouse over the image. If omitted, it displays the card's name prepended with the language name (none in case of English language).
The named parameter d determines if the digital version of the card is to be displayed. Setting this parameter to non-empty value automatically adds Digital to the card's base name (before language name, if any). Then, if the description parameter is not provided, the description will be the name of the card is appended with a proper developer name (depending on d value: 0/g - "Goko/Making Fun", 1/s - "Shuffle iT", 2/t - "Temple Gates Games") prepended with language name.
{{CardLangVersionImage|Russian|d=1}} or {{CardLangVersionImage|Russian|d=s}}
on Witch page will display this:
The named parameter o determines if the old version of the card is to be displayed. Setting this parameter to 1 automatically adds Old to the card's base name (after Digital and language, if any are specified). Setting this parameter to anything other than 1 adds Old to the filename as well, but also appends this value - for example o=2 will produce Old2.
{{CardLangVersionImage|o=1}}
on Witch page will display this:
The named parameter n can override the automatic use of the {{PAGENAME}} template and display the image of any card.
{{CardLangVersionImage|n=Saboteur|d=t}}
on any page will display this: