Difference between revisions of "Item"

m
m
Line 1: Line 1:
<includeonly>{{#vardefine:quality class<!-- define quality class
+
<includeonly>{{#vardefine:item class<!-- define item class
 
-->|{{#switch:{{lc:{{#if:{{{quality|}}}<!-- if quality parameter
 
-->|{{#switch:{{lc:{{#if:{{{quality|}}}<!-- if quality parameter
 
-->|{{{quality}}}<!-- use quality parameter
 
-->|{{{quality}}}<!-- use quality parameter
Line 14: Line 14:
 
-->{{#iferror:{{icon|{{{icon|{{{1}}}.png}}}}}<!-- if icon doesn't exist
 
-->{{#iferror:{{icon|{{{icon|{{{1}}}.png}}}}}<!-- if icon doesn't exist
 
-->|{{#if:{{#show:{{{link|{{{1}}}}}}|?Has icon}}<!-- if item has 'Has icon' property
 
-->|{{#if:{{#show:{{{link|{{{1}}}}}}|?Has icon}}<!-- if item has 'Has icon' property
-->|<span class="{{#var:quality class}}">[[File:{{#show:{{{link|{{{1}}}}}}|?Has icon}}|25px]]</span><!-- then use 'Has icon' property
+
-->|<span class="{{#var:item class}}">[[File:{{#show:{{{link|{{{1}}}}}}|?Has icon}}|25px]]</span><!-- then use 'Has icon' property
 
-->|{{#ifeq:{{#explode:{{{1}}}|:|0}}|Recipe<!-- else if item is a recipe
 
-->|{{#ifeq:{{#explode:{{{1}}}|:|0}}|Recipe<!-- else if item is a recipe
-->|{{Recipe icon|{{{1}}}|small=y|quality={{#var:quality class}}}}<!-- use recipe icon
+
-->|{{Recipe icon|{{{1}}}|small=y|quality={{#var:item class}}}}<!-- use recipe icon
 
-->|[[File:{{{1}}}.png|?]]}}}}<!-- else handle non-existent icon
 
-->|[[File:{{{1}}}.png|?]]}}}}<!-- else handle non-existent icon
-->|<span class="{{#var:quality class}}">{{icon|{{{icon|{{{1}}}.png}}}|{{{link|{{{1}}}}}}|25}}}}</span><!-- add icon with link
+
-->|<span class="{{#var:item class}}">{{icon|{{{icon|{{{1}}}.png}}}|{{{link|{{{1}}}}}}|25}}}}</span><!-- add icon with link
 
-->{{#if:{{{nolabel|}}}||<!-- if no label is specified
 
-->{{#if:{{{nolabel|}}}||<!-- if no label is specified
 
-->&nbsp;{{#ifeq:{{lc:{{{link}}}}}|no<!-- if no link is specified
 
-->&nbsp;{{#ifeq:{{lc:{{{link}}}}}|no<!-- if no link is specified

Revision as of 14:54, 13 January 2024

Description

Displays a item's icon and name, with a link to the page of the item.

Usage

{{item|<Spine>|<common>|<icon=Spine.png>|<link=Spine>|<nolabel=yes>}}

Parameters

Arrow.png1: The name of the item.
Required.
Arrow.png2: The item's Quality.
Optional.
Arrow.pngicon: The item's icon.
Optional. Defaults to '{{{1}}}.png'.
Arrow.pnglink: The page link.
Optional. Defaults to '{{{1}}}'.
Notes: If set to 'no', label will be plaintext.
Arrow.pngnolabel: Determines whether the name of the item is shown.
Optional.
Notes: Set this parameter any value to hide label text.