Template:Icon

From Sun Haven Wiki
Jump to navigation Jump to search
float Template documentation[View] [Edit] [History] - [Sandbox] [Refresh]

Returns an icon based on the input. Primary used in other Lua templates.

Dependencies:
This template uses Module:Icon.

Syntax

{{Icon
|NAME OF ITEM
|size = Define a different image size. (optional)
|link = Define a different image link. (optional)
|note = Appended a note after the link. (optional)
|x    = Define an amount of the item. (optional)
|ext  = Define a different image file. (optional)
|nolink = When this is set to true, the name of the item will appear, but will not link to the corresponding page. (optional)
|notext = When this is set to true, the name of the item will not appear, but the icon will still link to the corresponding page. (optional)
|br = When this is set to true, the template will add a line break
}}

Examples

Variables Syntax Example
Basic
{{Icon|Apple}}
Apple.png Apple
Size
{{Icon|Apple|size=70}}
Apple.png Apple
Link
{{Icon|Apple|link=Carrot}}
Apple.png Apple
Note
{{Icon|Apple|note=This is a shiny apple.}}
Apple.png Apple This is a shiny apple.
Amount
{{Icon|Apple|x=2}}
Apple.png Apple × 2
Extension
{{Icon|Sprinkles|ext=gif}}
Sprinkles.gif Sprinkles
No Link
{{Icon|Claude Wedding Ring|nolink=true}}
Claude Wedding Ring.pngClaude Wedding Ring
No Text
{{Icon|Claude Wedding Ring|notext=true}}
Claude Wedding Ring.png
Line break
{{Icon|Claude Wedding Ring|br=true}} This is text after the item.
Claude Wedding Ring.png Claude Wedding Ring
This is text after the item.
Many
{{Icon|Apple|size=10|link=carrot|note=Tiny Apple.|x=2}}
Apple.png Apple × 2 Tiny Apple.
See the articles and the templates currently using this template.