Template:Item List: Difference between revisions

From Vintage Story Wiki
m (Minor change to how the icon works)
mNo edit summary
 
(One intermediate revision by the same user not shown)
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==
The purpose of this template is to link an item, complete with icon, to a page.
The purpose of this template is to link an item with an icon (if stated), to a page.


''Note: The correct capitalization is '''I'''tem '''L'''ist. Do not forget the second capitalized letter!''
''Note: The correct capitalization is '''I'''tem '''L'''ist. Do not forget the second capitalized letter!''
Line 11: Line 11:
  ! Example !! Output
  ! Example !! Output
  |-
  |-
  | <nowiki>{{Item List | item=Flint | page=Metal}}</nowiki> ||  {{Item List | item=Flint | icon=Flint | page=Metal}}
  | <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}}

Latest revision as of 21:04, 15 April 2021


Description

The purpose of this template is to link an item with an icon (if stated), 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}} Ingot-gold.png 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.