Difference between revisions of "Template:Item"

From TRO Wiki
Jump to navigation Jump to search
(This might not work right away but hopefully it does)
 
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><img src="https://www.divine-pride.net/img/items/item/kRO/{{{id}}}.png"> {{ {{ #if:{{{link|}}} | plainlink |url=https://www.divine-pride.net/database/item/{{{id}}} }} {{ #if:{{{prefix|}}} | {{{prefix}}} }} {{ #if:{{{num|}}} | {{{num}}} }} {{{item}}}{{ #if:{{{slots|}}} | [{{{slots}}}<nowiki>]</nowiki> }} }} {{ #if:{{{postfix|}}} | {{{postfix}}} }} </includeonly><noinclude>
+
<includeonly>https://static.divine-pride.net/images/items/item/{{{id}}}.png {{{item}}}</includeonly><noinclude>
   
Template for cleanly adding an icon to an item name. It has the ability to link to Divine Pride's database, but will default to no link since DP's item data may differ from TRO's.
+
Template for cleanly adding an icon to an item name. It's very rudimentary for now.
  +
If the item has slots, you can simply add it under the item name.
  +
  +
If you want the text to link to Divine Pride database, use '''[[Template:Itemlink]]'''.
   
 
== Syntax ==
 
== Syntax ==
   
<code><nowiki>{{Item List|id=|item=|link=|num=|slots=}}</nowiki></code>
+
<code><nowiki>{{Item|id=|item=}}</nowiki></code>
   
 
; Parameters
 
; Parameters
 
; id : The unique id of the item.
 
; id : The unique id of the item.
; item : The name of the item.
+
; item : The name of the item. Include item numbers or slots if needed.
; link : '''(Optional)''' Insert value to convert into a link to Divine Pride's database
 
; num : '''(Optional)''' The quantity of items.
 
; slots : '''(Optional)''' The number of slots of the item has it.
 
   
 
== Example ==
 
== Example ==
   
Using <code><nowiki>{{Item List|id=2285|item=Apple of Archer}}</nowiki></code> will result into {{Item List|id=2285|item=Apple of Archer}}
+
Using <code><nowiki>{{Item|id=2285|item=Apple of Archer}}</nowiki></code> will result into {{Item|id=2285|item=Apple of Archer}}
 
Using <code><nowiki>{{Item List|id=2285|item=Apple of Archer|link=1}}</nowiki></code> will result into {{Item List|id=2285|item=Apple of Archer|link=1}}
 
   
Using <code><nowiki>{{Item List|id=2285|item=Apple of Archer|num=5}}</nowiki></code> will result into {{Item List|id=2285|item=Apple of Archer|num=5}}
+
Using <code><nowiki>{{Item|id=2285|item=5 Apple of Archer}}</nowiki></code> will result into {{Item|id=2285|item=5 Apple of Archer}}
   
Using <code><nowiki>{{Item List|id=2285|item=Apple of Archer|slots=2}}</nowiki></code> will result into {{Item List|id=2285|item=Apple of Archer|slots=2}}
+
Using <code><nowiki>{{Item|id=2285|item=Apple of Archer [2]}}</nowiki></code> will result into {{Item|id=2285|item=Apple of Archer [2]}}
 
</noinclude>
 
</noinclude>

Latest revision as of 11:40, 10 December 2025


Template for cleanly adding an icon to an item name. It's very rudimentary for now. If the item has slots, you can simply add it under the item name.

If you want the text to link to Divine Pride database, use Template:Itemlink.

Syntax

{{Item|id=|item=}}

Parameters
id
The unique id of the item.
item
The name of the item. Include item numbers or slots if needed.

Example

Using {{Item|id=2285|item=Apple of Archer}} will result into 2285.png Apple of Archer

Using {{Item|id=2285|item=5 Apple of Archer}} will result into 2285.png 5 Apple of Archer

Using {{Item|id=2285|item=Apple of Archer [2]}} will result into 2285.png Apple of Archer [2]