Template:SpellDisplay: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
This template looks up a spell via its internal ID and produces an icon + link to the associated spell page. | |||
This is used in Hero infoboxes. | |||
<pre><nowiki>{{SpellDisplay|id=day_16_magic_arinas_chosen}}</nowiki></pre> | |||
{{SpellDisplay|id=day_16_magic_arinas_chosen}} | {{SpellDisplay|id=day_16_magic_arinas_chosen}} | ||
</noinclude><includeonly>{{#cargo_query:tables=Spell=S | |||
| | <pre><nowiki>{{SpellDisplay|id=night_3_magic_enlarge_shadow|lang=pl}}</nowiki></pre> | ||
|where=S.id='{{{id}}}' | |||
|format=template | {{SpellDisplay|id=night_3_magic_enlarge_shadow|lang=pl}} | ||
|template=MediumIconDisplay | |||
|named args= yes | </noinclude><includeonly>{{#cargo_query: | ||
tables = Spell=S, | |||
Translation=spell_t, Translation=spell_en | |||
|join on = S.id = spell_t.target_id, | |||
S.id = spell_en.target_id | |||
|where = S.id = '{{{id|}}}' | |||
AND spell_t.type = 'spell' AND spell_t.language = '{{{lang|en}}}' | |||
AND spell_en.type = 'spell' AND spell_en.language = 'en' | |||
|fields = spell_t.name = name, | |||
spell_en.name = pagelink, | |||
CONCAT(spell_en.name) = filename | |||
|format = template | |||
|template= MediumIconDisplay | |||
|named args = yes | |||
}}</includeonly> | }}</includeonly> | ||
Latest revision as of 07:02, 16 May 2026
This template looks up a spell via its internal ID and produces an icon + link to the associated spell page.
This is used in Hero infoboxes.
{{SpellDisplay|id=day_16_magic_arinas_chosen}}
{{SpellDisplay|id=night_3_magic_enlarge_shadow|lang=pl}}


