Welcome to the DFO World Wiki. With many major updates since the release of DFO, many items are missing. Visit Item Database Project to learn more.
Please remember to click "show preview" before saving the page.
Thanks for the updated logo snafuPop!
Difference between revisions of "Template:Item"
(force no item.png to be 20x20) |
(Due to semantic reporting valid pages, we need to check if variables are empty) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly>{{# | + | <includeonly>{{#ifeq:{{Exists|{{{1}}}}}|1|{{#if: |
− | {{#vardefine:icon|{{#show:{{{1|Item}}}|?Has | + | {{#vardefine:icon|{{#show:{{{1|Item}}}|?Has icon|link=none|default=File:No_Icon.png}}}} |
{{#vardefine:name|{{#show:{{{1|Item}}}|?Has name|default={{{1|Item}}}}}}} | {{#vardefine:name|{{#show:{{{1|Item}}}|?Has name|default={{{1|Item}}}}}}} | ||
{{#vardefine:rarity|{{#if:{{{rarity|}}}|{{#show:{{{1|Item}}}|?Has item rarity|link=none|default=}}|}}}} | {{#vardefine:rarity|{{#if:{{{rarity|}}}|{{#show:{{{1|Item}}}|?Has item rarity|link=none|default=}}|}}}} | ||
− | }}<!-- | + | }}{{#if:{{#var:icon}}|<!--skip-->|{{#vardefine:icon|File:No_Icon.png}}}}{{#if:{{#var:name}}|<!--skip-->|{{#vardefine:name|{{{1|Item}}}}}}}<!-- dfoplayer. Due to semantic reporting valid pages, we need to check if variables are empty --><span style="display:inline-block; {{#if:{{{full size|}}}|width:28px;height:28px;|width:20px;height:20px}}"><!-- |
− | --><span style="display:inline-block; {{#if:{{{full size|}}}|width:28px;height:28px;|width:20px;height:20px}}"><!-- | ||
-->[[{{#if:{{{icon|}}} | -->[[{{#if:{{{icon|}}} | ||
| File:{{{icon}}} | | File:{{{icon}}} |
Latest revision as of 19:17, 30 June 2019
Contents
Description
This template displays a link to an item with its respective icon.
Usage
{{Item |<item page> |<text> | icon = | full size = | rarity = }}
Parameters
All parameters are optional unless stated otherwise.
- item page
- Required. Item page. The wiki page of the item.
- text
- Displayed text. Defaults to the name of the item.
- icon
- Icon file. Defaults to the icon of the item.
- full size
- Set to anything to display the icon in its original size.
- rarity
- Set to anything to color the text according to the item's rarity.
Examples
{{Item|Corrupt Imposter Death Scythe}}
{{Item|Corrupt Imposter Death Scythe|Blargh|full size = y|rarity = y}}