Difference between revisions of "Template:Item icon"

From Final Fantasy XIV Online Wiki
Jump to navigation Jump to search
m
m
Line 1: Line 1:
<includeonly><span class="{{#if:{{{large|}}}|medium|small}} item-icon thumb-icon" style="display:inline-block;overflow:hidden;{{#if:{{{large|}}}|width:35px;height:35px|width:20px;height:20px}};vertical-align:middle;"><!--
<includeonly>{{#if: <!-- hiding linebreaks -->
-->[[File:{{{icon|{{{1|Item}}}}}}.png|{{#if:{{{large|}}}|35x35px|20x20px}}|top|link={{{link|{{{1|Item}}}}}}]]</span>{{#if:{{{onlyicon|}}}||&nbsp;<!--
{{#vardefine:smw_icon|{{#show:{{{1|}}}|?Has game icon|link=none|default=File:Action.png}}}}
-->[[{{{1|Item}}}|{{{2|{{{1|Item}}}}}}]]}}</includeonly><noinclude>
{{#vardefine:smw_name|{{#show:{{{1|}}}|?Has canonical name|default={{{1|Action}}}}}}}
}}{{STFI|icon={{#explode:{{#var:smw_icon}}|:|1}}|link={{{1|}}}|size={{{size|small}}}}}{{#ifeq:{{lc:{{{2|}}}}}|x||&nbsp;[[{{{1|Action}}}|{{{2|{{#var:smw_name}}}}}]]}}</includeonly><noinclude>
 
== Description ==
== Description ==
<pre>{{item icon|<item name>}}</pre>
<pre>{{action icon|<action name>}}</pre>


Displays a link to the item and adds the item icon in front of it.
Displays a link to the action name (canonical name) and the action icon.  


=== Parameters ===
=== Parameters ===
; ''unnamed parameter'' 1
; ''unnamed parameter'' 1
: Item page name. Defaults to "Item".
: Item name. Defaults to "Item".
; ''unnamed parameter'' 2
; ''unnamed parameter'' 2
: Item name. Defaults to <tt><nowiki><param 1></nowiki></tt>.
: Link text. Defaults to [[Property:Has canonical name|canonical name]]. Assign ''x'' to prevent name from appearing.
; icon
; size
: Defines the icon to use. Defaults to <tt><nowiki><param 1></nowiki>.png</tt>.
: Optional. Either ''small'', ''mid'', or ''big''. Defaults to ''small''.
; link
: Item link. Defaults to <tt><nowiki><param 1></nowiki></tt>.
; onlyicon
: Put anything for this to only display icon.
; large
: Put anything for this to make the icon twice as large.


== Examples ==
== Examples ==
* {{item icon|Allagan Tomestone of Poetics}} is produced from <code><nowiki>{{item icon|Allagan Tomestone of Poetics}}</nowiki></code>
* {{action icon|Transpose}} is produced from <code><nowiki>{{action icon|Transpose}}</nowiki></code>
* {{item icon|Allagan Tomestone of Poetics|Gil}} is produced from <code><nowiki>{{item icon|Allagan Tomestone of Poetics|Gil}}</nowiki></code>
* {{action icon|Transpose|size=small}} is produced from <code><nowiki>{{action icon|Transpose|size=small}}</nowiki></code>
* {{item icon|Allagan Tomestone of Poetics|large=y}} is produced from <code><nowiki>{{item icon|Allagan Tomestone of Poetics|large=y}}</nowiki></code>
* {{action icon|Transpose|size=mid}} is produced from <code><nowiki>{{action icon|Transpose|size=mid}}</nowiki></code>
* {{item icon|Allagan Tomestone of Poetics|link=Gil}} is produced from <code><nowiki>{{item icon|Allagan Tomestone of Poetics|link=Gil}}</nowiki></code>
* {{action icon|Transpose|size=big}} is produced from <code><nowiki>{{action icon|Transpose|size=big}}</nowiki></code>
* {{item icon|Amalj'aa Reputation|onlyicon=y}} is produced from <code><nowiki>{{item icon|Amalj'aa Reputation|onlyicon=y}}</nowiki></code>
* {{action icon|Malefic|x}} is produced from <code><nowiki>{{action icon|Malefic|x}}</nowiki></code>
* {{item icon|Nonexistent page|Example}} is produced from <code><nowiki>{{item icon|Nonexistent page|Example}}</nowiki></code>
 
<pre>This is an example a paragraph with the {{action icon|Rampart}} action in it.</pre>
This is an example a paragraph with the {{action icon|Rampart}} action in it.


[[Category:Icon templates|Item icon]]</noinclude>
[[Category:Icon templates|Item icon]]</noinclude>

Revision as of 05:19, 13 July 2017


Description

{{action icon|<action name>}}

Displays a link to the action name (canonical name) and the action 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

  • Transpose.png  Transpose is produced from {{action icon|Transpose}}
  • Transpose.png  Transpose is produced from {{action icon|Transpose|size=small}}
  • Transpose.png  Transpose is produced from {{action icon|Transpose|size=mid}}
  • Transpose.png  Transpose is produced from {{action icon|Transpose|size=big}}
  • Malefic.png  is produced from {{action icon|Malefic|x}}
This is an example a paragraph with the {{action icon|Rampart}} action in it.

This is an example a paragraph with the Rampart.png  Rampart action in it.