Voxel Tycoon Wiki
(Add examples)
(Change order)
Line 6: Line 6:
 
==Usage==
 
==Usage==
 
{{tlx|ItemLink|1}}
 
{{tlx|ItemLink|1}}
  +
 
===Parameters===
 
* <code>1</code> is the main and only mandatory parameter. The template will add content equivalent to <nowiki><span style="white-space:nowrap;">[[File:1.png|x40px|link=1|alt=]] [[1]]</span></nowiki>.
 
* <code>image</code> if specified will change the image used. Note that file extension must be specified if using this parameter.
 
* <code>link</code> if specified will change the link target on the image and link.
 
* <code>size</code> if specified will change the size of the associated image.
 
* <code>text</code> if specified will change the display text of the link, but not the link target
   
 
==Examples==
 
==Examples==
Line 16: Line 23:
 
{{tlx|ItemLink|Unknown item}}
 
{{tlx|ItemLink|Unknown item}}
 
{{ItemLink|Unknown item}}
 
{{ItemLink|Unknown item}}
 
===Parameters===
 
* <code>1</code> is the main and only mandatory parameter. The template will add content equivalent to <nowiki><span style="white-space:nowrap;">[[File:1.png|x40px|link=1|alt=]] [[1]]</span></nowiki>.
 
* <code>image</code> if specified will change the image used. Note that file extension must be specified if using this parameter.
 
* <code>link</code> if specified will change the link target on the image and link.
 
* <code>size</code> if specified will change the size of the associated image.
 
* <code>text</code> if specified will change the display text of the link, but not the link target
 
   
 
{{doc/end}}
 
{{doc/end}}

Revision as of 22:21, 5 May 2021

Template-info.png Documentation

This template takes a single parameter and provides a link to something accompanied by a 40px image of it. For this template to work, there must be a png image with the same name of the page you are trying to link to.

Optional parameters can change this behavior but are for most use cases unneeded.

Usage

{{ItemLink|1}}

Parameters

  • 1 is the main and only mandatory parameter. The template will add content equivalent to <span style="white-space:nowrap;">[[File:1.png|x40px|link=1|alt=]] [[1]]</span>.
  • image if specified will change the image used. Note that file extension must be specified if using this parameter.
  • link if specified will change the link target on the image and link.
  • size if specified will change the size of the associated image.
  • text if specified will change the display text of the link, but not the link target

Examples

{{ItemLink|Copper ore}} Copper ore

{{ItemLink|Alloy smelter}} Alloy smelter

{{ItemLink|Unknown item}} Unknown item