Template:ItemIcon: Difference between revisions
From Melvor Idle
Falterfire (talk | contribs) (Added a non-linebreaking space to prevent icon and link from being split up) |
Falterfire (talk | contribs) (Added override to allow changing of link.) |
||
Line 1: | Line 1: | ||
A template for quickly building item links with icons. For example, <nowiki>{{ItemIcon|Compost}}</nowiki> becomes {{ItemIcon|Compost}} | A template for quickly building item links with icons. For example, <nowiki>{{ItemIcon|Compost}}</nowiki> becomes {{ItemIcon|Compost}}. | ||
Adding a second argument allows you to override the text. For example, <nowiki>{{ItemIcon|Generous Harvest Potion I|Generous Harvest Potion}}</nowiki> gives {{ItemIcon|Generous Harvest Potion I|Generous Harvest Potion}} | |||
<onlyinclude>[[File:{{{1}}} (item).svg|25px|link={{{1}}}]] [[{{{1}}}]]</onlyinclude> | |||
<onlyinclude>{{#if:{{{2|}}}|[[File:{{{1}}} (item).svg|25px|link={{{1}}}]] [[{{{1}}}|{{{2}}}]]|[[File:{{{1}}} (item).svg|25px|link={{{1}}}]] [[{{{1}}}]]}}</onlyinclude> |
Revision as of 14:19, 10 August 2020
A template for quickly building item links with icons. For example, {{ItemIcon|Compost}} becomes Compost.
Adding a second argument allows you to override the text. For example, {{ItemIcon|Generous Harvest Potion I|Generous Harvest Potion}} gives Generous Harvest Potion
[[File:{{{1}}} (item).svg|25px|link={{{1}}}]] [[{{{1}}}]]