Template:UpgradeIcon: Difference between revisions

Added link override.
m (whoops typo)
(Added link override.)
Line 1: Line 1:
A template for quickly building upgrade links with icons. For example, <nowiki>{{UpgradeIcon|Dragon Pickaxe}}</nowiki> becomes {{UpgradeIcon|Dragon Pickaxe}}
A template for quickly building upgrade links with icons. For example, <nowiki>{{UpgradeIcon|Dragon Pickaxe}}</nowiki> becomes {{UpgradeIcon|Dragon Pickaxe}}


Also allows for overriding the link text with a second argument. For example, <nowiki>{{UpgradeIcon|Dragon Axe|The Best Axe}}</nowiki> becomes {{UpgradeIcon|Dragon Axe|The Best Axe}}


<onlyinclude>[[File:{{{1}}} (upgrade).svg|25px|link={{{1}}}]]&nbsp;[[{{{1}}}]]</onlyinclude>
 
<onlyinclude>{{#if:{{{2|}}}|[[File:{{{1}}} (upgrade).svg|25px|link={{{1}}}]]&nbsp;[[{{{1}}}|{{{2}}}]]|[[File:{{{1}}} (upgrade).svg|25px|link={{{1}}}]]&nbsp;[[{{{1}}}]]}}</onlyinclude>