Jump to content

Template:Name/doc: Difference between revisions

From Stardew Valley Wiki
imported>Katzeus
mNo edit summary
imported>Katzeus
mNo edit summary
Line 8: Line 8:


<pre>{{name|''item name''|''amount''}}</pre>
<pre>{{name|''item name''|''amount''}}</pre>
 
===Optional Parameters===
*size: the image size to be displayed (example: size=48)
*image: an alternative image to display (example: image=Angler.png)
*link: replace the name with a link to another page
==Exmaples==
==Exmaples==
<pre>
<pre>
Line 21: Line 24:
<pre>{{name|Apple|size=48}}</pre>
<pre>{{name|Apple|size=48}}</pre>
Result: {{name|Apple|size=48}}
Result: {{name|Apple|size=48}}
If the size parameter is used is should be placed after the quantity number:
If the size parameter is used together with quantity it should be placed after the quantity number:
<pre>{{name|Melon|3|size=48}}</pre>
<pre>{{name|Melon|3|size=48}}</pre>
Result: {{name|Melon|3|size=48}}
Result: {{name|Melon|3|size=48}}
If the image parameter is used together with quantity it should be placed after the quantity number:
<pre>{{name|Grape|3|image=Hops.png}}</pre>
Result: {{name|Grape|3|image=Hops.png}}
If the link parameter is used together with quantity it should be placed after the quantity number:
<pre>{{name|Corn|3|link=Grape}}</pre>
Result: {{name|Corn|3|link=Grape}}
<includeonly>[[Category:Transclusion templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>
<includeonly>[[Category:Transclusion templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>

Revision as of 02:09, 3 March 2016

Description

This template is used to place the picture of a named item next to the name, resizes the image to 24px 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. To refer to villagers and NPCs, use Template:NPC.

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 name''|''amount''}}

Optional Parameters

  • size: the image size to be displayed (example: size=48)
  • image: an alternative image to display (example: image=Angler.png)
  • link: replace the name with a link to another page

Exmaples

{{name|Complete Breakfast|30}}

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

{{name|Corn|30}}

Result: Corn (30)

{{name|Preserves Jar|3}}

Result: Preserves Jar (3) Size can be defined by using the named parameter "size":

{{name|Apple|size=48}}

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

{{name|Melon|3|size=48}}

Result: Melon (3) If the image parameter is used together with quantity it should be placed after the quantity number:

{{name|Grape|3|image=Hops.png}}

Result: Grape (3) If the link parameter is used together with quantity it should be placed after the quantity number:

{{name|Corn|3|link=Grape}}

Result: Grape (3)