Template:Item List: Difference between revisions
From Vintage Story Wiki
ZulfBracket (talk | contribs) m (Minor change to how the icon works) |
ZulfBracket (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
<includeonly>{{#if: {{{icon}}} | [[File:{{{icon}}}.png|link=|25px]]}} [[{{{page}}} | {{{item}}}]]</includeonly> | <includeonly>{{#if: {{{icon|}}} | [[File:{{{icon}}}.png|link=|25px]]}} [[{{{page}}} | {{{item}}}]]</includeonly> | ||
<noinclude> | <noinclude> | ||
==Description== | ==Description== | ||
Line 11: | Line 11: | ||
! Example !! Output | ! Example !! Output | ||
|- | |- | ||
| <nowiki>{{Item List | item=Flint | page=Metal}}</nowiki> || {{Item List | item | | <nowiki>{{Item List | item=Flint | page=Metal}}</nowiki> || {{Item List | item=Flint | page=Metal}} | ||
|- | |- | ||
| <nowiki>{{Item List | item=Gold Ingot | icon=Ingot-gold | page=Metal}}</nowiki> || {{Item List | item=Gold Ingot | icon=Ingot-gold | page=Metal}} | | <nowiki>{{Item List | item=Gold Ingot | icon=Ingot-gold | page=Metal}}</nowiki> || {{Item List | item=Gold Ingot | icon=Ingot-gold | page=Metal}} |
Revision as of 21:02, 15 April 2021
Description
The purpose of this template is to link an item, complete with icon, to a page.
Note: The correct capitalization is Item List. Do not forget the second capitalized letter!
Usage
Example | Output |
---|---|
{{Item List | item=Flint | page=Metal}} | Flint |
{{Item List | item=Gold Ingot | icon=Ingot-gold | page=Metal}} | Gold Ingot |
Fields
item | Name of the item.. |
icon | File name for the icon to be shown. Most items in the wiki have a size of 100px, so the template enforces it to 25px. |
page | Article that the item will link. |