Template:Item/doc

An all-in-one template for display item name/icon/link.

By default, displays a link to the item and adds an item icon in front of it.

Usage
All parameters are optional. Despite this, some combinations are invalid and may cause errors, e.g.

See examples below for more details.

Default item display name, link target, and image file name. If unspecified, will try to retrieve it from.
 * unnamed parameter 1

Custom link text, which can include line breaks (&lt;br />) and other wikitext. If an 's', 'es', 'ies' or 'ves' is passed as the custom text, it will be appended to the end of the item name. Pluralism is partially intuitive - adding 's' to Butterfly will return Butterflies. For non-english language, auto translation will be applied.
 * unnamed Parameter 2

Custom link text, it will override unnamed Parameter 2, and it will be displayed as-is, without plural processing and auto translation.
 * t

Display mode. It can be: Use preferred values as much as possible to get the best performance.
 * mode
 *  (Preferred) or   or   means only image will be displayed;
 *  (Preferred) or   means no image will be displayed;
 *  (Preferred) or   will output 2 cells code for table. This is roughly a shortcut for

image filename, no brackets nor "File:"(must include file extension, eg. Parrot.png).
 * image

You can specify multiple images, just separate filenames with slashes(eg. Parrot.png/Parrot (placed).png).

Custom graphic size (Read Extended image syntax for details).
 * size

You can specify multiple sizes, just separated with slashes(eg. 32px/24x24px).

When multiple images specified:
 * If only one size specified, it will apply to all images
 * if size is less then image, extra images will be displayed as if they don't have size argument
 * if size is more then image, extra sizes will simply be ignored.

And you can append it with  to scale image, e.g. ,   ...

Image(s) will be scaled based on  and. e.g.  is equal to. This will multiply with scale factor in size parameter,  is equal to. scale can be set by options.
 * scale

Image size limit. Using standard image size syntax, eg. 32px/24x24px. will be applied after scale.
 * maxsize

image file extension, default is png. Only valid when there is no image input.
 * ext

Custom link target. If blank given(i.e.  ), it will be no link(See example below). Note: eicons also will base on link first.
 * link

Same as  , only valid when there is no   input. If you use  , it will be ignored.
 * nolink = y/yes

If set, will create an anchor for  .
 * anchor = y/yes

Extra note text. By default, it will be displayed as smaller and gray text between item name and platform icons, and without link on it.
 * note

Another note text. By default, it will be displayed as gray txt in normal size, without link, and always take a single line.
 * note2

Another note text. It will always be displayed after all other text block.
 * bignote

Only valid when there is no id= or note2= input. If set, platform icons and/or note will be displayed in new line.
 * wrap = y/yes

n/no=suppresses the platform icons; default is yes; other values will completely override platform icons part, in this case, the value of this parameter should/must usually be ..., see examples below.
 * icons = n/no/y/yes/

Reduces the size of the platform icons (useful when space is an issue).
 * small = y/yes

Number, will display items(or other type) ID information.
 * id

the type of ID, case-insensitive, default is  , only valid when id is specified. can be  ,  ,  ,  ,  ,  ,  , or  . All other values are treated as  .
 * type

Explicitly turn on/off id display. Default is on when  is set, off when   is not set. If  is turned on and   is not set, will auto retrieve id from database (using data templates such as  itemIdFromName, according to value of  ).
 * showid = y/yes/n/no

Custom Css class(es). There're some predefined classes for certain formatting purpose(see examples below). You can add yours if needed.
 * class

Custom css style rules.
 * css or style

Size and scale
Note: Due to the way of 's size option works, if you want to set a size(after scale) larger then origin image size, you need to set it in DDpx or DDxDDpx, and xDDpx will be no effect. e.g. for Beeswax,  will be no effect.

Wrap, id, note, note2 and bignote
is valid only when  and   are not specified.

Display mode
{| class="terraria lined" !Result !! Code !! Note
 * ||  || By default, it will display image and text info.
 * ||  || Force to use default mode.
 * ||  ||  : Only image will be displayed, no text, no note, no id, and no platform icons.
 * ||  ||  : image won't be displayed.
 * ||  ||  : Only image will be displayed, no text, no note, no id, and no platform icons.
 * ||  ||  : image won't be displayed.
 * ||  ||  : image won't be displayed.
 * ||  ||  : image won't be displayed.


 * : output as two adjacent cells for table.


 * : rowspan


 * : hide border between 2 cells.
 * }

Transform
You can transform item image via these CSS classes.

The transformation happens at the center of the image and its effective dimensions will retain the original values of the object as if untransformed. So be careful with  and.

Change default options
'''NOTE: In order to avoid unwanted influences, it is very important to restore options state as soon as possible, especially in the template. Use options/snap and options/restore'''

See examples below for more details.

About Translation
item is i18n-ready and integrated automatic translation. When translate to other language, It may not require any edit, auto translation will get things done, for example: if there is still English text, or you want to modify display text, please keep unnamed parameter 1 untouched(item will handle the image and link target), and change unnamed parameter 2, for example: