Template:Item/doc: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Donni Iris (talk | contribs) |
||
| (23 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
== Description == | == Description == | ||
:Use this template whenever you want the item icon and link to display. | :Use this template whenever you want the item icon and link (to the item's Wiki page) to display. | ||
:If the Item is to be displayed in a loot table for a monster, use [[Template:Loot]] instead. | |||
:If you only want to display an item's icon, or use a larger image of the icon, use the [[Template:Item_icon|Item icon]] template. | |||
:If you need the icon for an ability, use the template for [[Template:Ability_icon|Ability icon]]. | |||
== Syntax == | == Syntax == | ||
:Type {{ | :Type <kbd><nowiki>{{Item|Item name}}</nowiki></kbd> or <kbd><nowiki>{{Item|Icon|Item name}}</nowiki></kbd> where you want the item icon and link to display. | ||
== Parameters == | == Parameters == | ||
; Icon | |||
: OPTIONAL name of icon to use if different than item name. | |||
; Item name | ; Item name | ||
: The | : The correctly capitalized name of the item. | ||
; Link | |||
: The text to display while linking to <kbd><nowiki>Item name</nowiki></kbd>. | |||
== Sample output == | == Sample output == | ||
{| class="wikitable" | ;Basic usage | ||
:{| class="wikitable" | |||
| Code | |||
| {{=}} | |||
| Output | |||
|- | |||
| <nowiki>{{Item|Saltpeter}}</nowiki> | |||
| ⇒ | |||
| <!-- -->{{Item|Saltpeter}} | |||
|} | |||
:{| class="wikitable" | |||
| Code | |||
| {{=}} | |||
| Output | |||
|- | |||
| <nowiki>{{Item|Fisherman's Arrangement #1}}</nowiki> | |||
| ⇒ | |||
| <!-- -->{{Item|Fisherman's Arrangement #1}} | |||
|} | |||
:{| class="wikitable" | |||
| Code | |||
| {{=}} | |||
| Output | |||
|- | |||
| <nowiki>{{Item|Fisherman's Arrangement #1|Fisherman's Arrangement 1}}</nowiki> | |||
| ⇒ | |||
| <!-- -->{{Item|Fisherman's Arrangement #1|Fisherman's Arrangement 1}} | |||
|} | |||
:{| class="wikitable" | |||
| Code | |||
| {{=}} | |||
| Output | |||
|- | |||
| <nowiki>{{Item|Icon=Fisherman's Arrangement #1|Fisherman's Arrangement 1}}</nowiki> | |||
| ⇒ | |||
| <!-- -->{{Item|Icon=Fisherman's Arrangement #1|Fisherman's Arrangement 1}} | |||
|} | |||
:{| class="wikitable" | |||
| Code | |||
| {{=}} | |||
| Output | |||
|- | |||
| <nowiki>{{Item|Icon=Fisherman's Arrangement #1|Item name=Fisherman's Arrangement 1}}</nowiki> | |||
| ⇒ | |||
| <!-- -->{{Item|Icon=Fisherman's Arrangement #1|Item name=Fisherman's Arrangement 1}} | |||
|} | |||
:{| class="wikitable" | |||
| Code | |||
| {{=}} | |||
| Output | |||
|- | |||
| <nowiki>{{Item|Beginner's Arrow|Learn Archery|Archery}}</nowiki> | |||
| ⇒ | |||
| <!-- -->{{Item|Beginner's Arrow|Learn Archery|Archery}} | |||
|} | |||
:{| class="wikitable" | |||
| Code | |||
| {{=}} | |||
| Output | |||
|- | |||
| <nowiki>{{Item|Icon=Beginner's Arrow|Item name=Learn Archery|Archery}}</nowiki> | |||
| ⇒ | |||
| <!-- -->{{Item|Icon=Beginner's Arrow|Item name=Learn Archery|Archery}} | |||
|} | |||
:{| class="wikitable" | |||
| Code | |||
| {{=}} | |||
| Output | |||
|- | |||
| <nowiki>{{Item|Icon=Beginner's Arrow|Item name=Learn Archery|Link=Archery}}</nowiki> | |||
| ⇒ | |||
| <!-- -->{{Item|Icon=Beginner's Arrow|Item name=Learn Archery|Link=Archery}} | |||
|} | |||
;Legacy example | |||
:Using an alternate icon and link with alternate text. Note usage of <kbd><nowiki>{{pipe}}</nowiki></kbd> to distinguish from normal template arguments: | |||
:{| class="wikitable" | |||
| Code | | Code | ||
| {{=}} | | {{=}} | ||
| Output | | Output | ||
|- | |- | ||
| {{ | | <nowiki>{{Item|Icon=Beginner's Arrow|Archery{{pipe}}Learn Archery}}</nowiki> | ||
| ⇒ | | ⇒ | ||
| {{Item| | | <!-- -->{{Item|Icon=Beginner's Arrow|Archery{{pipe}}Learn Archery}} | ||
|} | |} | ||
== | == Notes == | ||
* Uses the new [[Template:Item icon]] template. | |||
* WHY? To support enhancements in <nowiki>{{Vendor item row}}</nowiki> template. | |||
* This will break slightly when used on many flower arrangements and flower arrangement-related items, due to the # sign in the URL. See the example above for the workaround. | |||
<includeonly> | <includeonly> | ||
<!-- Categories/interwikis for the template itself --> | <!-- Categories/interwikis for the template itself --> | ||
[[Category:Formatting templates| | [[Category:Formatting templates|Item]] | ||
</includeonly><noinclude> | </includeonly><noinclude> | ||
<!-- Categories/interwikis for this documentation itself --> | <!-- Categories/interwikis for this documentation itself --> | ||
[[Category:Template documentation|{{PAGENAME}}]] | [[Category:Template documentation|{{PAGENAME}}]] | ||
</noinclude> | </noinclude> | ||
Latest revision as of 17:50, 7 April 2026
Description
- Use this template whenever you want the item icon and link (to the item's Wiki page) to display.
- If the Item is to be displayed in a loot table for a monster, use Template:Loot instead.
- If you only want to display an item's icon, or use a larger image of the icon, use the Item icon template.
- If you need the icon for an ability, use the template for Ability icon.
Syntax
- Type {{Item|Item name}} or {{Item|Icon|Item name}} where you want the item icon and link to display.
Parameters
- Icon
- OPTIONAL name of icon to use if different than item name.
- Item name
- The correctly capitalized name of the item.
- Link
- The text to display while linking to Item name.
Sample output
- Basic usage
Code = Output {{Item|Saltpeter}} ⇒ http://cdn.projectgorgon.com/v456/icons/icon_.png Error: Item not found }} [[Expression error: Unrecognized punctuation character "{".]]
Code = Output {{Item|Fisherman's Arrangement #1}} ⇒ http://cdn.projectgorgon.com/v456/icons/icon_.png Error: Item not found }} [[Expression error: Unrecognized punctuation character "{".]]
Code = Output {{Item|Fisherman's Arrangement #1|Fisherman's Arrangement 1}} ⇒ http://cdn.projectgorgon.com/v456/icons/icon_.png Error: Item not found }} [[Expression error: Unrecognized punctuation character "{".]]
Code = Output {{Item|Icon=Fisherman's Arrangement #1|Fisherman's Arrangement 1}} ⇒ http://cdn.projectgorgon.com/v456/icons/icon_.png Error: Item not found }} [[Expression error: Unrecognized punctuation character "{".]]
Code = Output {{Item|Icon=Fisherman's Arrangement #1|Item name=Fisherman's Arrangement 1}} ⇒ http://cdn.projectgorgon.com/v456/icons/icon_.png Error: Item not found }} [[Expression error: Unrecognized punctuation character "{".]]
Code = Output {{Item|Beginner's Arrow|Learn Archery|Archery}} ⇒ http://cdn.projectgorgon.com/v456/icons/icon_.png Error: Item not found }} [[Expression error: Unrecognized punctuation character "{".]]
Code = Output {{Item|Icon=Beginner's Arrow|Item name=Learn Archery|Archery}} ⇒ http://cdn.projectgorgon.com/v456/icons/icon_.png Error: Item not found }} [[Expression error: Unrecognized punctuation character "{".]]
Code = Output {{Item|Icon=Beginner's Arrow|Item name=Learn Archery|Link=Archery}} ⇒ http://cdn.projectgorgon.com/v456/icons/icon_.png Error: Item not found }} [[Expression error: Unrecognized punctuation character "{".]]
- Legacy example
- Using an alternate icon and link with alternate text. Note usage of {{pipe}} to distinguish from normal template arguments:
Code = Output {{Item|Icon=Beginner's Arrow|Archery{{pipe}}Learn Archery}} ⇒ http://cdn.projectgorgon.com/v456/icons/icon_.png Error: Item not found }} [[Expression error: Unrecognized punctuation character "{".]]
Notes
- Uses the new Template:Item icon template.
- WHY? To support enhancements in {{Vendor item row}} template.
- This will break slightly when used on many flower arrangements and flower arrangement-related items, due to the # sign in the URL. See the example above for the workaround.