Jump to content

Template:Item/doc

From SPS Wiki

Description

[edit source]

This template creates the icon and link for an item.

List of Parameter

[edit source]

This template has 2 unnamed parameters:

  1. (mandatory) Name of the item. If set to Unknown no link is set.
  2. (optional) Height of the icon. Defaults to 30.

There are also 5 optional named parameters:

  • link: Sets another page to be linked.
  • text: Displays another text instead of the name of the item.
  • x: Quantity of the item. Part of the text.
  • maxWidth: Limit to how wide the image of the item can be. Defaults to 40.
  • nolink: if set to 1, this removes the text and hyperlink, leaving only the icon and the quantity

Syntax

[edit source]
{{Item
 | 1             = item name (i.e. image name)
 | 2             = image size
 | link          = 
 | text          = 
 | x             = 
 | maxWidth      = 
}}

Sample output

[edit source]

Dark Matter 40 Dark Matter

{{Item|Dark Matter|link=Currency|text=Dark Matter|x=40}}

A template intended to link items in-line with icons of the item.

Template parameters

This template has custom formatting.

ParameterDescriptionTypeStatus
Item Name1

The name of the item.

Example
Diamond
Stringrequired
Image Height2

The pixel height of the item image.

Default
30
Example
30
Stringoptional
Image Max WidthmaxWidth

The maximum width of the item image.

Default
40
Example
40
Stringoptional
Item Quantityx

The quantity of the item.

Example
3
Stringsuggested
Disable Link Flagnolink

If set to 1, disables linking the item name.

Default
0
Example
1
Stringoptional
Custom Link Targetlink

Overrides the link target for the item.

Example
Item Page
Stringsuggested
Custom Display Texttext

Overrides the displayed text for the item.

Example
Shiny Diamond
Stringoptional