Template:Icon: Difference between revisions
From Melvor Idle
Falterfire (talk | contribs) (Finally just made a generic version of the icon template.) |
Falterfire (talk | contribs) (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}}}]] [[{{{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|}}}|| [[{{{1}}}{{#if:{{{2|}}}|{{!}}{{{2}}}}}]]}}</onlyinclude></includonly> |
Revision as of 14:29, 1 September 2020
A generic version of the template used in things like Template:ItemIcon or Template:UpgradeIcon.
You probably want to use one of the following instead for most things:
- Template:ItemIcon for items
- Template:MonsterIcon for monsters
- Template:Skill for skill
- Template:UpgradeIcon for upgrades (like the File:Dragon Pickaxe (upgrade). Dragon Pickaxe
- Template:PetIcon for pets
- Template:PrayerIcon for prayers
Format is like so: {{Icon|type=combatArea|Castle of Kings|Knight Time}} becomes Knight Time.
You can also just do {{Icon|Combat}} Combat if you need an icon for an image that doesn't belong to a given category.
This template also has a 'notext' option for when you just want the icon, so {{Icon|Mastery|notext=true}} becomes