Jump to content

Template:Item/doc

From The Petit Planet Wiki
Revision as of 10:51, 4 May 2026 by Stevium (talk | contribs) (Standardizing parameter naming convention to snake_case)
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 uses CSS found at MediaWiki:Gadget-Item.css.

Template that adds a link to icons.

Syntax

{{Item|}}

This template has 2 unnamed parameters:

  • 1 / name – Name of the item.
  • 2 / size – Size of the icon. Default: 30.
  • x / count – Quantity of the item. Part of the text.
  • type – Special keyword to adjust the file's suffix and prefix.
  • link – Set another page to be linked.
  • text – Display another text instead of the name of the item.
  • no_text – Set to 1 to omit the complete text. The icon will no longer behave like an inline-block.
  • note – Append a note after the item text and count.
  • ref – Append a reference to the item text.
  • comma – Set to 1 to append a comma to the item text following AmE rules.
  • dot – Set to 1 to append a dot to the item text following AmE rules.
  • comma_spc – Set to 1 to append a comma and a space to the item text following AmE rules.
  • dot_spc – Set to 1 to append a dot and a space to the item text following AmE rules.

Examples

{{Item}} yields:
Unknown Unknown
{{Item|Unknown}} yields:
Unknown Unknown
{{Item|Kabuto Beetle}} yields:
Kabuto Beetle Kabuto Beetle
{{Item|Kabuto Beetle|40}} yields:
Kabuto Beetle Kabuto Beetle
{{Item|Kabuto Beetle|link = Insect|text = Custom text}} yields:
Kabuto Beetle Custom text
{{Item|Dough|x = 15|no_text = 1}} yields:
Dough×15
{{Item|Elsasani}} yields:
Elsasani Elsasani
{{Item|Hexia|note = Galaxy}} yields:
Hexia Hexia (Galaxy)

Template Data

Template that adds a link to icons.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Item1 name

Name of the item.

Example
Dough
Stringrequired
Size2 size

Size of the icon.

Default
30
Example
20, 40
Numberoptional
Quantityx count

Quantity of the item.

Example
1, 5, 10
Numberoptional
Typetype

Special keyword to adjust the file's suffix and prefix.

Default
Item
Stringoptional
Linklink

Set another page to be linked.

Default
<1>, <name>
Page nameoptional
No textno_text

Set to 1 to omit the complete text.

Example
1
Booleanoptional
Notenote

Append a note after the item text and count.

Stringoptional
Referenceref

Append a reference to the item text.

Stringoptional
Commacomma

Set to 1 to append a comma to the item text following AmE rules.

Example
1
Booleanoptional
Dotdot

Set to 1 to append a dot to the item text following AmE rules.

Example
1
Booleanoptional
Comma and spacecomma_spc

Set to 1 to append a comma and a space to the item text following AmE rules.

Example
1
Booleanoptional
Dot and spacedot_spc

Set to 1 to append a dot and a space to the item text following AmE rules.

Example
1
Booleanoptional