Difference between revisions of "Template:Item icon"

From Final Fantasy XIV Online Wiki
Jump to navigation Jump to search
m
m (Undo revision 152517 by Valento (talk))
Line 2: Line 2:
{{#vardefine:smw_icon|{{#show:{{{1|}}}|?Has game icon|link=none|default=File:Item.png}}}}
{{#vardefine:smw_icon|{{#show:{{{1|}}}|?Has game icon|link=none|default=File:Item.png}}}}
{{#vardefine:smw_name|{{#show:{{{1|}}}|?Has canonical name|default={{{1|Item}}}}}}}
{{#vardefine:smw_name|{{#show:{{{1|}}}|?Has canonical name|default={{{1|Item}}}}}}}
}}{{STFI|icon={{#explode:{{#var:smw_icon}}|:|1}}|link={{{1|}}}|size={{{size|small}}}}}{{#if:{{{amount|}}}|&nbsp;{{{amount}}}}}{{#ifeq:{{lc:{{{2|}}}}}|x||&nbsp;[[{{{1|Item}}}|{{#if:{{{2|}}}|{{{2}}}|{{#var:smw_name}}}}]]}}</includeonly><noinclude>
}}{{STFI|icon={{#explode:{{#var:smw_icon}}|:|1}}|link={{{1|}}}|size={{{size|small}}}}}{{#ifeq:{{lc:{{{2|}}}}}|x||&nbsp;[[{{{1|Item}}}|{{#if:{{{2|}}}|{{{2}}}|{{#var:smw_name}}}}]]}}</includeonly><noinclude>


== Description ==
== Description ==
Line 16: Line 16:
; size
; size
: Optional. Either ''small'', ''mid'', or ''big''. Defaults to ''small''.
: Optional. Either ''small'', ''mid'', or ''big''. Defaults to ''small''.
; amount
: Optional. Amount to be appended after icon.


== Examples ==
== Examples ==
Line 25: Line 23:
* {{item icon|Raisins|size=big}} is produced from <code><nowiki>{{item icon|Raisins|size=big}}</nowiki></code>
* {{item icon|Raisins|size=big}} is produced from <code><nowiki>{{item icon|Raisins|size=big}}</nowiki></code>
* {{item icon|Raisins|x}} is produced from <code><nowiki>{{item icon|Raisins|x}}</nowiki></code>
* {{item icon|Raisins|x}} is produced from <code><nowiki>{{item icon|Raisins|x}}</nowiki></code>
* {{item icon|Raisins|amount=13}} is produced from <code><nowiki>{{item icon|Raisins|amount=13}}</nowiki></code>


<pre>This is an example a paragraph with the {{item icon|Raisins}} item in it.</pre>
<pre>This is an example a paragraph with the {{item icon|Raisins}} item in it.</pre>

Revision as of 05:28, 22 April 2018


Description

{{item icon|<item name>}}

Displays a link to the item name (canonical name) and the item icon.

Parameters

unnamed parameter 1
Item name. Defaults to "Item".
unnamed parameter 2
Link text. Defaults to canonical name. Assign x to prevent name from appearing.
size
Optional. Either small, mid, or big. Defaults to small.

Examples

  • Raisins icon1.png  Raisins is produced from {{item icon|Raisins}}
  • Raisins icon1.png  Raisins is produced from {{item icon|Raisins|size=small}}
  • Raisins icon1.png  Raisins is produced from {{item icon|Raisins|size=mid}}
  • Raisins icon1.png  Raisins is produced from {{item icon|Raisins|size=big}}
  • Raisins icon1.png  is produced from {{item icon|Raisins|x}}
This is an example a paragraph with the {{item icon|Raisins}} item in it.

This is an example a paragraph with the Raisins icon1.png  Raisins item in it.