Template:Item icon: Difference between revisions

From FHX Wiki
mNo edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>[[File:{{#ifexist: File:{{{1}}} icon.png|{{{1}}} icon.png|{{#ifexist: File:{{{1}}} icon.gif|{{{1}}} icon.gif|{{#ifexist: File:{{{2}}} icon.gif|{{{2}}} icon.gif|missing icon.png}}}}}}|{{#switch:{{{3}}}|big=50|huge=100|#default=32}}px|link={{{1}}}]] [[{{{1}}}]]</includeonly><noinclude>
<includeonly>{{exists|page=File:{{{1|noexist}}} icon.png|then=[[File:{{{1}}} icon.png|{{#switch:{{{3|}}}|big=50|huge=100|#default=32}}px|link={{{1}}}]] [[{{{1}}}]]|else={{exists|page=File:{{{1|noexist}}} icon.gif|then=[[File:{{{1}}} icon.gif|{{#switch:{{{3|}}}|big=50|huge=100|#default=32}}px|link={{{1}}}]] [[{{{1}}}]]|else={{exists|page=File:{{{2|noexist}}} icon.gif|then=[[File:{{{2}}} icon.gif|{{#switch:{{{3|}}}|big=50|huge=100|#default=32}}px|link={{{1}}}]] [[{{{1}}}]]|else=[[File:missing icon.png|{{#switch:{{{3|}}}|big=50|huge=100|#default=32}}px|link={{{1}}}]] [[{{{1}}}]]}}}}}}</includeonly><noinclude>
== Description ==
== Description ==
<pre>{{item icon|<item name>|<monster item type>}}</pre>
<pre>{{item icon|<item name>|<icon name>|<size>}}</pre>


Displays a link to the item and adds an icon in front of it.
Displays a link to the item and adds an icon in front of it.
Line 9: Line 9:
: Item name.  
: Item name.  
;2 ''(unnamed parameter)''
;2 ''(unnamed parameter)''
: Optional. Monster item type. (e.g. bone, tail scorpion, leather, etc.)
: Optional. Include icon name if item uses same icon as other items. (e.g. bone, leather, Ring Leather Cloak, etc.)
;3 ''(unnamed parameter)''
;3 ''(unnamed parameter)''
: Icon size. Options: "big" (48px), "huge" (100px), or, blank (32px) - which is the default size.
: Optional. Icon size. Options: "big" (48px), "huge" (100px), or, blank (32px) - which is the default size.


== Examples ==
== Examples ==
Line 18: Line 18:
* {{item icon|Skeleton Leg|bone}} is produced from <code><nowiki>{{item icon|Skeleton Leg|bone}}</nowiki></code>
* {{item icon|Skeleton Leg|bone}} is produced from <code><nowiki>{{item icon|Skeleton Leg|bone}}</nowiki></code>
* {{item icon|Giant Scorpion Tail|tail scorpion}} is produced from <code><nowiki>{{item icon|Skeleton Leg|bone}}</nowiki></code>
* {{item icon|Giant Scorpion Tail|tail scorpion}} is produced from <code><nowiki>{{item icon|Skeleton Leg|bone}}</nowiki></code>
[[Category:Icon templates]]
</noinclude>
</noinclude>

Latest revision as of 23:24, 21 February 2025

Description

{{item icon|<item name>|<icon name>|<size>}}

Displays a link to the item and adds an icon in front of it.

Parameters

1 (unnamed parameter)
Item name.
2 (unnamed parameter)
Optional. Include icon name if item uses same icon as other items. (e.g. bone, leather, Ring Leather Cloak, etc.)
3 (unnamed parameter)
Optional. Icon size. Options: "big" (48px), "huge" (100px), or, blank (32px) - which is the default size.

Examples