Difference between revisions of "Template:Item icon"
Jump to navigation
Jump to search
m |
m |
||
Line 1: | Line 1: | ||
<includeonly>{{#if: <!-- hiding linebreaks --> | <includeonly>{{#if: <!-- hiding linebreaks --> | ||
{{#vardefine:smw_icon|{{#show:{{{1|}}}|?Has game icon|link=none|default=File: | {{#vardefine:smw_icon|{{#show:{{{1|}}}|?Has game icon|link=none|default=File:Item.png}}}} | ||
{{#vardefine:smw_name|{{#show:{{{1|}}}|?Has canonical name|default={{{1| | {{#vardefine:smw_name|{{#show:{{{1|}}}|?Has canonical name|default={{{1|Item}}}}}}} | ||
}}{{STFI|icon={{#explode:{{#var:smw_icon}}|:|1}}|link={{{1|}}}|size={{{size|small}}}}}{{#ifeq:{{lc:{{{2|}}}}}|x|| [[{{{1| | }}{{STFI|icon={{#explode:{{#var:smw_icon}}|:|1}}|link={{{1|}}}|size={{{size|small}}}}}{{#ifeq:{{lc:{{{2|}}}}}|x|| [[{{{1|Item}}}|{{{2|{{#var:smw_name}}}}}]]}}</includeonly><noinclude> | ||
== Description == | == Description == | ||
<pre>{{ | <pre>{{item icon|<item name>}}</pre> | ||
Displays a link to the | Displays a link to the item name (canonical name) and the item icon. | ||
=== Parameters === | === Parameters === | ||
Line 24: | Line 24: | ||
* {{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> | ||
<pre>This is an example a paragraph with the {{item icon|Raisins}} | <pre>This is an example a paragraph with the {{item icon|Raisins}} item in it.</pre> | ||
This is an example a paragraph with the {{item icon|Raisins}} | This is an example a paragraph with the {{item icon|Raisins}} item in it. | ||
[[Category:Icon templates|Item icon]]</noinclude> | [[Category:Icon templates|Item icon]]</noinclude> |
Revision as of 12:55, 25 July 2017
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 is produced from
{{item icon|Raisins}}
- Raisins is produced from
{{item icon|Raisins|size=small}}
- Raisins is produced from
{{item icon|Raisins|size=mid}}
- Raisins is produced from
{{item icon|Raisins|size=big}}
{{item icon|Raisins|x}}
is produced from
This is an example a paragraph with the {{item icon|Raisins}} item in it.
This is an example a paragraph with the Raisins item in it.