Template:Sandbox/Aurelain/LinkIcon: Difference between revisions

From Heroes of Might and Magic: Olden Era Official Wiki
No edit summary
No edit summary
Line 9: Line 9:
|where =
|where =
     (E.target_id = '{{{id}}}' OR E.subtype = '{{{id}}}')
     (E.target_id = '{{{id}}}' OR E.subtype = '{{{id}}}')
     AND E.type = '{{{type}}}'
     AND E.type = '{{{type|}}}'
     AND E.language = 'en'
     AND E.language = 'en'
     AND T.type  = '{{{type}}}'
     AND T.type  = '{{{type|}}}'
     AND T.language = '{{{lang|en}}}'
     AND T.language = '{{{lang|en}}}'
|fields =
|fields =
Line 36: Line 36:
===Usage===
===Usage===


{{Color|yellow|Input:}} <code><nowiki>{{LinkIcon|type=faction|id=human|suffix=_icon.png}}</nowiki></code><br>
{{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/LinkIcon|id=day_3_magic_haste}}</nowiki></code>
 
{{Color|lime|Output:}} {{Sandbox/Aurelain/LinkIcon|type=faction|id=human|suffix=_icon.png}}
---
{{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/LinkIcon|type=faction|id=human|suffix=_icon.png}}</nowiki></code>
 
{{Color|lime|Output:}} {{Sandbox/Aurelain/LinkIcon|type=faction|id=human|suffix=_icon.png}}
{{Color|lime|Output:}} {{Sandbox/Aurelain/LinkIcon|type=faction|id=human|suffix=_icon.png}}
----
----
{{Color|yellow|Input:}} <code><nowiki>{{LinkIcon|type=faction|id=human|suffix=_icon.png|lang=pl}}</nowiki></code><br>
{{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/LinkIcon|type=faction|id=human|suffix=_icon.png|lang=pl}}</nowiki></code>
 
{{Color|lime|Output:}} {{Sandbox/Aurelain/LinkIcon|type=faction|id=human|suffix=_icon.png|lang=pl}}
{{Color|lime|Output:}} {{Sandbox/Aurelain/LinkIcon|type=faction|id=human|suffix=_icon.png|lang=pl}}
----
----
{{Color|yellow|Input:}} <code><nowiki>{{LinkIcon|type=faction|id=human|suffix=_icon.png|size=64px}}</nowiki></code><br>
{{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/LinkIcon|type=faction|id=human|suffix=_icon.png|size=64px}}</nowiki></code>
 
{{Color|lime|Output:}} {{Sandbox/Aurelain/LinkIcon|type=faction|id=human|suffix=_icon.png|size=64px}}
{{Color|lime|Output:}} {{Sandbox/Aurelain/LinkIcon|type=faction|id=human|suffix=_icon.png|size=64px}}
----
----
{{Color|yellow|Input:}} <code><nowiki>{{LinkIcon|type=faction|id=human|suffix=_icon.png|size=128px}}</nowiki></code><br>
{{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/LinkIcon|type=faction|id=human|suffix=_icon.png|size=128px}}</nowiki></code>
 
{{Color|lime|Output:}} {{Sandbox/Aurelain/LinkIcon|type=faction|id=human|suffix=_icon.png|size=128px}}
{{Color|lime|Output:}} {{Sandbox/Aurelain/LinkIcon|type=faction|id=human|suffix=_icon.png|size=128px}}


</noinclude>
</noinclude>

Revision as of 05:29, 26 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.

Usage

Input: {{Sandbox/Aurelain/LinkIcon|id=day_3_magic_haste}}

Output: Temple --- Input: {{Sandbox/Aurelain/LinkIcon|type=faction|id=human|suffix=_icon.png}}

Output: Temple


Input: {{Sandbox/Aurelain/LinkIcon|type=faction|id=human|suffix=_icon.png|lang=pl}}

Output: Świątynia


Input: {{Sandbox/Aurelain/LinkIcon|type=faction|id=human|suffix=_icon.png|size=64px}}

Output: Temple


Input: {{Sandbox/Aurelain/LinkIcon|type=faction|id=human|suffix=_icon.png|size=128px}}

Output: Temple