Difference between revisions of "Item"
Stratonian (talk | contribs) m |
Stratonian (talk | contribs) m |
||
Line 14: | Line 14: | ||
}}<!-- | }}<!-- | ||
-->}}<!-- else get 'Has quality' property | -->}}<!-- else get 'Has quality' property | ||
− | -->{{# | + | -->{{#ifexist:File:{{{1}}}.png<!-- if icon exists |
+ | -->|<span class="{{#var:item class}}">{{icon|{{{icon|{{{1}}}.png}}}|{{{link|{{{1}}}}}}|25}}}}</span><!-- add icon with link | ||
+ | -->{{#if:{{{nolabel|}}}||<!-- if no label is specified | ||
+ | --> {{#ifeq:{{lc:{{{link}}}}}|no<!-- if no link is specified | ||
+ | -->|{{{1}}}<!-- use plaintext | ||
+ | -->|[[{{{link|{{{1}}}}}}|{{{1}}}]]}}<!-- else add link | ||
+ | else 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:item 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:item 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 |
− | |||
− | |||
− | |||
− | |||
− | |||
--></includeonly><noinclude>{{{{PAGENAME}}/Documentation}}</noinclude> | --></includeonly><noinclude>{{{{PAGENAME}}/Documentation}}</noinclude> |
Revision as of 11:17, 3 February 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
- 2: The item's Quality.
- Optional.