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"

From DFO World Wiki
Jump to: navigation, search
(add rarity display option)
Line 2: Line 2:
 
{{#vardefine:icon|{{#show:{{{1|Item}}}|?Has game icon|link=none|default=File:No_Icon.png}}}}
 
{{#vardefine:icon|{{#show:{{{1|Item}}}|?Has game 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=}}|}}}}
 
}}<!--  
 
}}<!--  
 
--><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}}"><!--  
Line 8: Line 9:
 
  | {{#var:icon}} }}|{{#if:{{{full size|}}}|28x28px|20x20px}}|link={{{1|}}}]]</span>&nbsp;<!--  
 
  | {{#var:icon}} }}|{{#if:{{{full size|}}}|28x28px|20x20px}}|link={{{1|}}}]]</span>&nbsp;<!--  
 
-->{{#if:{{{2|}}}
 
-->{{#if:{{{2|}}}
| [[{{{1}}}|{{{2|}}}]]
+
| [[{{{1}}}|{{#if:{{#var:rarity}}|{{Rarity|{{#var:rarity}}|{{{2}}}}}|{{{2}}}}}]]
| [[{{{1}}}|{{#var:name}}]]
+
| [[{{{1}}}|{{#if:{{#var:rarity}}|{{Rarity|{{#var:rarity}}|{{#var:name}}}}|{{#var:name}}}}]]
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
 
== Description ==
 
== Description ==
Line 21: Line 22:
 
| icon =  
 
| icon =  
 
| full size =  
 
| full size =  
 +
| rarity =
 
}}</pre>
 
}}</pre>
  
Line 26: Line 28:
 
All parameters are optional unless stated otherwise.
 
All parameters are optional unless stated otherwise.
  
; ''item page'' : Required. Item page. The wiki page of the item.
+
; item page : Required. Item page. The wiki page of the item.
; ''text'' : Displayed text. Defaults to the name of the item.
+
; text : Displayed text. Defaults to the name of the item.
; ''icon'' : Icon file. Defaults to the icon 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.
+
; 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 ===
 
=== Examples ===
Line 37: Line 40:
 
{{Item|Corrupt Imposter Death Scythe}}
 
{{Item|Corrupt Imposter Death Scythe}}
  
<pre>{{Item|Corrupt Imposter Death Scythe|Blargh|full size = y}}</pre>
+
<pre>{{Item|Corrupt Imposter Death Scythe|Blargh|full size = y|rarity = y}}</pre>
  
{{Item|Corrupt Imposter Death Scythe|Blargh|full size = y}}
+
{{Item|Corrupt Imposter Death Scythe|Blargh|full size = y|rarity = y}}
  
 
[[Category:Formatting Templates]]</noinclude>
 
[[Category:Formatting Templates]]</noinclude>

Revision as of 19:03, 15 April 2016

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}}

Corrupt Imposter Death Scythe.png Corrupt Imposter Death Scythe

{{Item|Corrupt Imposter Death Scythe|Blargh|full size = y|rarity = y}}

Corrupt Imposter Death Scythe.png Blargh