Template:Sandbox/Aurelain/LinkIcon: Difference between revisions

From Heroes of Might and Magic: Olden Era Official Wiki
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>
<includeonly>
link_id={{{link_id}}},
link_id={{{link_id}}},
{{Translation|{{{link_id}}}|{{{lang}}}}}
{{Translation|{{{link_id}}}|{{{lang|en}}}}}
<!--
<!--
-->{{#cargo_query:
-->{{#cargo_query:
Line 38: Line 38:
                 <!-- normal -->
                 <!-- normal -->
                 |#default={{#if:{{{link_id|}}}
                 |#default={{#if:{{{link_id|}}}
                     |{{Translation|{{{link_id}}}|{{{lang}}}}}
                     |{{Translation|{{{link_id}}}|{{{lang|en}}}}}
                     |E.name
                     |E.name
                 }}
                 }}

Revision as of 09:35, 26 August 2026


19. With link_id to hijack the url:

Input:

{{Sandbox/Aurelain/LinkIcon
    | id = sub_class_demons_magic_2
    | suffix=_icon.png
    | link_id = magic_demon
}}

Output:

link_id=magic_demon, Herald

Identifier must not contain quote, dot or null characters: got 'Herald'

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 file name is that it is identical to the id, plus the .png extension. This can be further configured with the suffix parameter, or be completely overridden by the filename parameter.


1. Basic:

(rarely used, as you usually need to specify type and suffix)

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

Output: link_id={{{link_id}}}, {{{link_id}}}💬 Herald


2. With type:

Input: {{Sandbox/Aurelain/LinkIcon | id=skill_assault | type=skill}}

Output: link_id={{{link_id}}}, {{{link_id}}}💬 Offense


3. With suffix:

(to override the default .png)

Input: {{Sandbox/Aurelain/LinkIcon | id=angel | suffix=_icon.png}}

Output: link_id={{{link_id}}}, {{{link_id}}}💬 Angel


4. With lang:

(to override the default en)

Input: {{Sandbox/Aurelain/LinkIcon | id=magic_demon || lang=ja}}

Output: link_id={{{link_id}}}, {{{link_id}}}💬 ヘラルド


5. With size:

(to override the default 32px)

Input: {{Sandbox/Aurelain/LinkIcon | id=magic_demon | size=64px}}

Output: link_id={{{link_id}}}, {{{link_id}}}💬 Herald


6. With filename:

(to override the automated file path)

Input: {{Sandbox/Aurelain/LinkIcon | id=human_hero_1 | type=hero | filename=Ister.png}}

Output: link_id={{{link_id}}}, {{{link_id}}}💬 Ister


7. With zero filename:

(to disable the icon)

Input: {{Sandbox/Aurelain/LinkIcon | id=magic_demon | filename=0}}

Output: link_id={{{link_id}}}, {{{link_id}}}💬 Herald


8. With text:

(to override the automated text)

Input: {{Sandbox/Aurelain/LinkIcon | id=magic_demon | text=Hello}}

Output: link_id={{{link_id}}}, {{{link_id}}}💬 Hello


9. With zero text:

(to disable the text)

Input: {{Sandbox/Aurelain/LinkIcon | id=magic_demon | text=0}}

Output: link_id={{{link_id}}}, {{{link_id}}}💬


10. With link:

(to override the automated link)

Input: {{Sandbox/Aurelain/LinkIcon | id=magic_demon | link=Foobar}}

Output: link_id={{{link_id}}}, {{{link_id}}}💬 Herald


11. With zero link:

(to disable the link)

Input: {{Sandbox/Aurelain/LinkIcon | id=magic_demon | link=0}}

Output: link_id={{{link_id}}}, {{{link_id}}}💬 Herald


12. With color:

Input: {{Sandbox/Aurelain/LinkIcon | id=magic_demon | color=magenta}}

Output: link_id={{{link_id}}}, {{{link_id}}}💬 Herald


13. With stack=1:

(to switch to a vertical layout)

Input: {{Sandbox/Aurelain/LinkIcon | id=magic_demon | stack=1}}

Output: link_id={{{link_id}}}, {{{link_id}}}💬 Herald


14. With wrap=1:

(to allow the resulting link to wrap; useful if used without icons)

Input:

{|class=wikitable
|style="width:100px;"|{{Sandbox/Aurelain/LinkIcon|id=might_undead|suffix=_icon.png|wrap=1}}
|}

Output:

link_id={{{link_id}}}, {{{link_id}}}💬 Death Knight


15. With filename=1:

(to use the English name as filename)

Input: {{Sandbox/Aurelain/LinkIcon | id=human_hero_1 | type=hero | filename=1}}

Output: link_id={{{link_id}}}, {{{link_id}}}💬 Ister


16. Stinger conflict:

Input:

{{Sandbox/Aurelain/LinkIcon
    | id = wasp_upg_alt
    | type = unit
    | filename = 1
    | suffix = _icon.png
}}
{{Sandbox/Aurelain/LinkIcon
    | id = dungeon_hero_3
    | type = hero
    | filename = 1
}}

Output:

link_id={{{link_id}}}, {{{link_id}}}💬 Stinger

link_id={{{link_id}}}, {{{link_id}}}💬 Stinger

17. Summon Avatar conflict:

Input:

{{Sandbox/Aurelain/LinkIcon
    | id = bonus_magic_astral_summon_1
    | type = spell
}}
{{Sandbox/Aurelain/LinkIcon
    | id = skill_summoner
    | type = skill
}}

Output:

link_id={{{link_id}}}, {{{link_id}}}💬 Basic Summon Avatar

link_id={{{link_id}}}, {{{link_id}}}💬 Summon Avatar

18. Proper linking of Skill levels:

Input:

{{Sandbox/Aurelain/LinkIcon
    | id = skill_assault
    | type = skill_level
    | variant = 3
}}

Output:

link_id={{{link_id}}}, {{{link_id}}}💬 Expert Offense

19. With link_id to hijack the url:

Input:

{{Sandbox/Aurelain/LinkIcon
    | id = sub_class_demons_magic_2
    | suffix=_icon.png
    | link_id = magic_demon
}}

Output:

link_id=magic_demon, Herald

Identifier must not contain quote, dot or null characters: got 'Herald'