Template:Name

From Dreamlight Valley Wiki
Jump to navigation Jump to search

Description

This template is used to insert an image next to an article name, resize the image to 20px wide, create a link to the article, and a parameter to display quantity or other detail after the article name and link.

Image size can be adjusted using the parameter "size".

Usage

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

{{name|''item name''|''detail''}}

Optional Parameters

If used together with "detail" these should be entered after the detail value.

  • size=Adjust the width in px the image displays at (e.g. size=32)
  • image=Overrides the image matching the item name (e.g. image=Mickey Mouse.png)
  • link=Link to an alternative page

Examples

The most common use of this template doesn't define parameters by name, but by order.

{{name|Apple|5}}

results in...

Apple (5)

{{name|Buzz Lightyear's Space Pack}}

results in...

Buzz Lightyear's Space Pack


Optional Parameter Examples

The "detail" parameter can be any value, including another template

{{name|Donald Duck|{{price|100}}}}

results in...

Donald Duck (Star Coin icon.png 100)

The parameter "size" overrides the default (20px) image size

{{name|Wedding Cake|3|size=48}}

results in...

Wedding Cake (3)

Optional parameters can be used without a "detail" value

{{name|Scrooge McDuck|size=48}}

results in...

Scrooge McDuck

By default the image and link are the "name" value. Each can be overridden using named parameters "image" and "link".

{{name|Goofy|image=Mickey Mouse.png}}

results in...

Goofy

{{name|Goofy|link=Mickey Mouse}}

results in...

Mickey Mouse

To provide different linked text but the same page link, use the standard MediaWiki syntax for escaping a pipe character in a template:

{{name|Cute Nightstand (2)|link=Cute Nightstand (2){{!}}Cute Nightstand}}

results in...

Cute Nightstand

Optional parameters can also be combined

{{name|Crab|3|size=36|link=:Category:Seafood{{!}}Seafood}}

results in...

Seafood (3)