Template:Name/doc

From Eastward Wiki
Jump to navigation Jump to search

Description

This template is used to place the icon of a ingredient category or item next to the name, resizes the icon 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=Tomato.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|seafood|30}}

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

{{name|Seafood|10}}

Result: Seafood.png Seafood (10)

{{name|Fruit|3}}

Result: Fruit.png Fruit (3)

Optional parameter examples:

Cooking it requires three {{name|Vegetable|vegetable type ingredients|class=inline}}.

Result: Cooking it requires three Vegetable.png Vegetable (vegetable type ingredients).

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

{{name|Meat|size=32}}

Result: Meat.png Meat

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

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

Result: Vegetable.png Vegetable (3)

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

{{name|Tomato|3|image=Tomato.png}}

Result: Tomato.png Tomato (3)

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

{{name|Meat|3|link=Ham}}

Result: Meat.png Ham (3)

It's also possible to use multiple optional parameters:

{{name|Vegetable|3|image=Tomato.png|size=64|class=inline}}.

Tomato.png Vegetable (3).