Template:Sandbox/Aurelain/LinkIcon: Difference between revisions
No edit summary |
No edit summary |
||
| Line 32: | Line 32: | ||
--></includeonly><noinclude> | --></includeonly><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 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. | ||
The default assumption for the icon's filename is that it is identical to the '''id''', plus the `.png` extension. This can be further configured with the '''prefix''' and '''suffix''' parameters, or completely overriden by the '''filename''' parameter. | |||
===Usage=== | ===Usage=== | ||
1. Basic (rarely used, as you usually also need to specify '''type'''): | |||
{{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/LinkIcon|id= | {{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/LinkIcon|id=unspeakable_ability_1_name_upg}}</nowiki></code> | ||
{{Color|lime|Output:}} {{Sandbox/Aurelain/LinkIcon|id= | {{Color|lime|Output:}} {{Sandbox/Aurelain/LinkIcon|id=unspeakable_ability_1_name_upg}} | ||
---- | ---- | ||
Revision as of 05:55, 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.
The default assumption for the icon's filename is that it is identical to the id, plus the `.png` extension. This can be further configured with the prefix and suffix parameters, or completely overriden by the filename parameter.
Usage
1. Basic (rarely used, as you usually also need to specify type):
Input: {{Sandbox/Aurelain/LinkIcon|id=unspeakable_ability_1_name_upg}}
Output: No results
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


