Template:Name/doc

From Starmancer Wiki
< Template:Name
Revision as of 13:38, 28 August 2021 by Katzeus (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Description

This template is used to place the picture of a named item or object next to the name, resizes the image to 20px wide, makes the item name a link if there's an available article of the same name, and lastly places the third parameter in parenthesis to signify quantity, relationship or any other secondary detail.

Image size can be adjusted by adding the parameter "size".

Usage

This template can be used by entering the following onto a relevant page.

{{name|''item/object name''|''amount''}}

Optional Parameters

All Optional Parameters if used together with "quantity" should be placed after the quantity value

  • size: the image size to be displayed (example: size=40)
  • image: an alternative image to display (example: image=Carrot.png)
  • link: replace the name with a link to another page
  • class: alternative classes. Currently there is only inline to suppress line break (example: class=inline)

Examples

{{name|Wood Chair|30}}

When used the parameters are not identified by name, but by order. Example use of this template;

{{name|Tomato|10}}

Result: Tomato Icon.png Tomato (10)

{{name|Wood Chair|3}}

Result: Wood Chair Icon.png Wood Chair (3)

Optional parameter examples:

Crafting recipe unlocked at {{name|Tomato Seed|Garden Plot Required|class=inline}}.

Result: Crafting recipe unlocked at Tomato Seed Icon.png Tomato Seed (Garden Plot Required).

Size can be defined by using the named parameter "size":

{{name|Tomato|size=32}}

Result: Tomato Icon.png Tomato

If the size parameter is used together with quantity it should be placed after the quantity number:

{{name|Wheat|3|size=24}}

Result: Wheat Icon.png Wheat (3)

If the image parameter is used together with quantity it should be placed after the quantity number:

{{name|Potato|3|image=Potato_Seed_Icon.png}}

Result: Potato Seed Icon.png Potato (3)

If the link parameter is used together with quantity it should be placed after the quantity number:

{{name|Carrot Seed|3|link=Carrot}}

Result: Carrot Seed Icon.png Carrot (3)

It's also possible to use multiple optional parameters:

{{name|Carrot Seed|3|image=Carrot_Icon.png|size=64|class=inline}}.

Carrot Icon.png Carrot Seed (3).