Template:SpellDisplay: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
Created page with "<noinclude> {{SpellDisplay|id=space_8_magic_carapace}} </noinclude><includeonly>{{#cargo_query:tables=Spell=S |fields= S.name, CONCAT(S.name)=filename, S.name=pagelink |where=S.id='{{{id}}}' |format=template |template=MediumIconDisplay |named args= yes |delimiter=\n }}</includeonly>" |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| 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. | |||
</noinclude><includeonly>{{#cargo_query:tables=Spell=S | This is used in Hero infoboxes. | ||
| | |||
|where=S.id='{{{id}}}' | <pre><nowiki>{{SpellDisplay|id=day_16_magic_arinas_chosen}}</nowiki></pre> | ||
|format=template | |||
|template=MediumIconDisplay | {{SpellDisplay|id=day_16_magic_arinas_chosen}} | ||
|named args= yes | |||
<pre><nowiki>{{SpellDisplay|id=night_3_magic_enlarge_shadow|lang=pl}}</nowiki></pre> | |||
{{SpellDisplay|id=night_3_magic_enlarge_shadow|lang=pl}} | |||
</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}}


