Template:Item/doc

Revision as of 16:19, 14 July 2026 by Valaerys (talk | contribs) (Created page with "{{Documentation/Header}} {{Lua}} This template creates an icon and link for a given Item. ==Syntax== {{T|Item|v1=item name|v2=optional size}} ==Parameter List== * {{F|1}} or {{F|name}} — Name of the item. Defaults to {{F|Unknown}}. * {{F|2}} or {{F|size}} — Size of the image in pixels. Defaults to {{F|30}}. * {{F|x}} or {{F|count}} — The amount of the item. * {{F|link}} — Page to link to. Defaults to the item name * {{F|text}} — Text t...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This is the documentation page for Item.
It contains usage information, categories, and other content not part of the original template page.
This template uses Module:Item, a script written in Lua.

This template creates an icon and link for a given Item.

Syntax

{{Item|item name|optional size}}

Parameter List

  • 1 or name — Name of the item. Defaults to Unknown.
  • 2 or size — Size of the image in pixels. Defaults to 30.
  • x or count — The amount of the item.
  • link — Page to link to. Defaults to the item name
  • text — Text to display. Defaults to the item name.
  • notext — Set to "1" to omit text.
  • type — Type of the item. Defaults to Item.
  • newline — Set to "1" to display text on a new line.
  • ref — Reference to append to the entire content.
  • comma — Append a comma to the item text following AmE rules.
  • dot — Append a dot to the item text following AmE rules.
  • commaspc — Append a comma and a space to the item text following AmE rules.
  • dotspc — Append a dot and a space to the item text following AmE rules.

Examples

Parameter #1

{{Item|Popsicle}} yields: Popsicle Popsicle

Parameter #2

{{Item|Popsicle|20|recipe = 1}} yields: Popsicle Popsicle
{{Item|Popsicle|200|recipe = 1}} yields: Popsicle Popsicle

{{Item|Popsicle|link = Popsicle|recipe = Popsicle}} yields: Popsicle Popsicle

text

{{Item|Popsicle|text = Not Popsicles}} yields: Popsicle Not Popsicles

notext

{{Item|Popsicle|notext = 1}} yields: Popsicle

x

{{Item|Popsicle|x = 5,000}} yields: Popsicle Popsicle ×5,000

Ending Punctuation

{{Item|Popsicle|x = 5,000|comma = 1}} yields: Popsicle Popsicle ×5,000,
{{Item|Lucky Star|comma = 1}} yields: Lucky Star Lucky Star,
{{Item|Lucky Star|note = this is an item|dotspc = 1}} yields: Lucky Star Lucky Star (this is an item).

Template Data

Creates an icon and link for a given Item.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Item Name1 name

Name of the Item

Default
Unknown
Stringrequired
Image Size2 size

Size of the image, in pixels

Default
30
Example
40
Stringoptional
Amountx count

Amount of the item

Example
120,000
Numbersuggested
Page Linklink

Page to link to, if different from the item. Defaults to the item name.

Stringoptional
Texttext

Text to display. Defaults to the item name.

Stringoptional
No Textnotext

Set to "1" to omit text after the item image

Booleanoptional
Typetype

Type of the item, for items that do not use the "Item" prefix

Default
Item
Stringoptional
whitewhite

no description

Unknownoptional
New Linenewline

Set to "1" to display text on a new line.

Booleanoptional