Jump to content

Template:Item: Difference between revisions

From The Petit Planet Wiki
Added TemplateStyles
mNo edit summary
Tag: Manual revert
 
Line 1: Line 1:
<includeonly><templatestyles src="Template:Item/styles.css" />{{#invoke:Item|main}}</includeonly><noinclude>{{Documentation|type=Image}}</noinclude>
<includeonly>{{#invoke:Item|main}}</includeonly><noinclude>{{Documentation|type=Image}}</noinclude>

Latest revision as of 15:49, 25 November 2025

Template documentation
Note: parts of or the entire template might not be visible without values provided.
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

[edit source]
{{Item}}

This template has 2 unnamed parameters:

  • 1 / name – Name of the item.
  • 2 / size – Size of the icon excluding the length unit. Default: 30.
  • x / count – Quantity of the item.
  • 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.
  • invert – Set to apply a filter to the image for either day/light or night/dark mode. Available values:
    • Default – See: Module:Item/Invert.
    • Day – Invert the image in day/light mode. Will invert light-colored icons to gray in day/light mode.
    • Night – Invert the image in night/dark mode. Will invert dark-colored icons to white in night/dark mode.
  • 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

[edit source]

{{Item}}

Unknown Unknown

{{Item|Kabuto Beetle}}

Kabuto Beetle Kabuto Beetle

{{Item|Kabuto Beetle|size=64}}

Kabuto Beetle Kabuto Beetle

{{Item|Kabuto Beetle|link=Insect|text=Custom text}}

Kabuto Beetle Custom text

{{Item|Dough|x=15|no_text=1}}

Dough×15

{{Item|Hexia|note=Galaxy}}

Hexia Hexia (Galaxy)

{{Item|Elsasani|text="Sani"|dot=1}}

Elsasani "Sani."

Template Data

[edit source]

Template that adds a link to icons.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Item1 name

Name of the item.

Example
Dough
Stringrequired
Size2 size

Size of the icon excluding the length unit.

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
Invertinvert

Set to apply a filter to the image for either day/light or night/dark mode.

Example
Day, Night
Stringoptional
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