Template:Sandbox/Aurelain/HeroesWithSpell: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
Created page with "<includeonly><!-- --> id={{{id|-}}},lang={{{lang|-}}}, {{#cargo_query: tables = Hero = H, Translation = T, Translation = E | join on = H.id = T.target_id, H.id = E.target_id | where = (H.start_magics HOLDS '{{{id}}}' OR H.start_magics HOLDS '{{{id}}}_special') AND H.id NOT LIKE 'campaign%' AND H.id NOT LIKE 'tutorial%' AND H.id NOT LIKE 'cm_fun%' AND T.type = 'hero' AND T.language = '{{{lang|en}}}' AND E.type = 'hero' A..." |
No edit summary |
||
| Line 23: | Line 23: | ||
E.name = link, | E.name = link, | ||
T.name = text, | T.name = text, | ||
T.language = lang | T.language = lang, | ||
CASE WHEN H.id LIKE '%special%' THEN 'yellow' ELSE "" END = color | |||
| format = | | format = | ||
template | template | ||
Revision as of 10:34, 28 June 2026
This template enumerates the heroes starting with a particular spell.
Usage
1. Basic, with the id of the spell:
Input: {{Sandbox/Aurelain/HeroesWithSpell | id=primal_3_magic_wean}}
Output: id=primal_3_magic_wean,lang=-,
Error: No field named "CASE WHEN H.id LIKE '%special%' THEN 'yellow' ELSE "" END" found for any of the specified database tables.
2. With lang:
Input: {{Sandbox/Aurelain/HeroesWithSpell | id=primal_3_magic_wean | lang=ja}}
Output: id=primal_3_magic_wean,lang=ja,
Error: No field named "CASE WHEN H.id LIKE '%special%' THEN 'yellow' ELSE "" END" found for any of the specified database tables.
3. When there are no heroes to match the criteria, the `wiki_none` text is displayed:
Input: {{Sandbox/Aurelain/HeroesWithSpell | id=neutral_magic_dimension_door}}
Output: id=neutral_magic_dimension_door,lang=-,
Error: No field named "CASE WHEN H.id LIKE '%special%' THEN 'yellow' ELSE "" END" found for any of the specified database tables.


