Anonymous

Template:Icon: Difference between revisions

From Melvor Idle
added notext option
(Finally just made a generic version of the icon template.)
 
(added notext option)
Line 7: Line 7:
* [[Template:Skill]] for skill
* [[Template:Skill]] for skill
* [[Template:UpgradeIcon]] for upgrades (like the {{UpgradeIcon|Dragon Pickaxe}}
* [[Template:UpgradeIcon]] for upgrades (like the {{UpgradeIcon|Dragon Pickaxe}}
* [[Template:PetIcon]] for pets
* [[Template:PrayerIcon]] for prayers


Format is like so: <nowiki>{{Icon|type=combatArea|Castle of Kings|Knight Time}}</nowiki> becomes {{Icon|type=combatArea|Castle of Kings|Knight Time}}.
Format is like so: <nowiki>{{Icon|type=combatArea|Castle of Kings|Knight Time}}</nowiki> becomes {{Icon|type=combatArea|Castle of Kings|Knight Time}}.
Line 12: Line 14:
You can also just do <nowiki>{{Icon|Combat}}</nowiki> {{Icon|Combat}} if you need an icon for an image that doesn't belong to a given category.
You can also just do <nowiki>{{Icon|Combat}}</nowiki> {{Icon|Combat}} if you need an icon for an image that doesn't belong to a given category.


<includeonly><onlyinclude>[[File:{{{1}}}{{#if:{{{type|}}}|_({{{type}}})|}}.{{{ext|svg}}}|25px|link={{{1}}}]]&nbsp;[[{{{1}}}{{#if:{{{2|}}}|{{!}}{{{2}}}}}]]</onlyinclude></includonly>
This template also has a 'notext' option for when you just want the icon, so <nowiki>{{Icon|Mastery|notext=true}}</nowiki> becomes {{Icon|Mastery|notext=true}}
 
<includeonly><onlyinclude>[[File:{{{1}}}{{#if:{{{type|}}}|_({{{type}}})|}}.{{{ext|svg}}}|25px|link={{{1}}}]]{{#if:{{{notext|}}}||&nbsp;[[{{{1}}}{{#if:{{{2|}}}|{{!}}{{{2}}}}}]]}}</onlyinclude></includonly>