Template:Sandbox/Aurelain/LinkIcon: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
Created page with "<noinclude> This template is meant to handle the linking of articles in a way that is language-agnostic, meaning that it can be used in language-aware infoboxes and other contexts which need to be able to handle multiple languages. This template only works with concepts which have their translation managed by Cargo. <pre><nowiki>{{LinkIcon|type=faction|id=human|suffix=_icon.png}}</nowiki></pre> {{LinkIcon|type=faction|id=human|suffix=_icon.png}} <pre><nowiki>{{LinkI..." |
No edit summary |
||
| Line 10: | Line 10: | ||
{{LinkIcon|type=faction|id=human|suffix=_icon.png|lang=pl}} | {{LinkIcon|type=faction|id=human|suffix=_icon.png|lang=pl}} | ||
<pre><nowiki>{{LinkIcon|type=faction|id=human|suffix=_icon.png|size=64px}}</nowiki></pre> | |||
{{LinkIcon|type=faction|id=human|suffix=_icon.png|lang=pl|size=64px}} | |||
</noinclude><includeonly>{{#cargo_query: | </noinclude><includeonly>{{#cargo_query: | ||
| Line 17: | Line 21: | ||
AND T_en.type = '{{{type}}}' AND T_en.language = 'en' | AND T_en.type = '{{{type}}}' AND T_en.language = 'en' | ||
AND T_disp.type = '{{{type}}}' AND T_disp.language = '{{{lang|en}}}' | AND T_disp.type = '{{{type}}}' AND T_disp.language = '{{{lang|en}}}' | ||
|fields = T_en.name = link, T_disp.name = text, T_disp.language = lang, CONCAT('{{{prefix|}}}', T_en.target_id,'{{{suffix|.png}}}') = filename | |fields = T_en.name = link, T_disp.name = text, T_disp.language = lang, CONCAT('{{{prefix|}}}', T_en.target_id,'{{{suffix|.png}}}') = filename, '{{{size}}}' = size | ||
|format = template | |format = template | ||
|template= Sandbox/Aurelain/Link/render | |template= Sandbox/Aurelain/Link/render | ||
Revision as of 09:49, 20 June 2026
This template is meant to handle the linking of articles in a way that is language-agnostic, meaning that it can be used in language-aware infoboxes and other contexts which need to be able to handle multiple languages. This template only works with concepts which have their translation managed by Cargo.
{{LinkIcon|type=faction|id=human|suffix=_icon.png}}
{{LinkIcon|type=faction|id=human|suffix=_icon.png|lang=pl}}
{{LinkIcon|type=faction|id=human|suffix=_icon.png|size=64px}}


