Difference between revisions of "Template:Iconlink"

From Minetest Wiki
Jump to navigation Jump to search
m
m
Line 1: Line 1:
<includeonly>[[File:{{{image|{{{1}}}.png}}}|16x16px|link={{#ifeq:{{{link|}}}|none||{{{link|{{{1}}}}}}}}]] {{#ifeq:{{{link|}}}|none|{{{text|{{{2|{{{1}}}}}}}}}|[[{{{link|{{{1}}}}}}|{{{text|{{{2|{{{1}}}}}}}}}]]}}</includeonly><noinclude>
+
<includeonly><span style="white-space: nowrap">[[File:{{{image|{{{1}}}.png}}}|16x16px|link={{#ifeq:{{{link|}}}|none||{{{link|{{{1}}}}}}}}]] {{#ifeq:{{{link|}}}|none|{{{text|{{{2|{{{1}}}}}}}}}|[[{{{link|{{{1}}}}}}|{{{text|{{{2|{{{1}}}}}}}}}]]}}</span></includeonly><noinclude>
 
== Parameters ==
 
== Parameters ==
  

Revision as of 17:53, 21 September 2020

Parameters

Name Usage
{{{1}}} Set the defaults for all other parameters
{{{image}}} Set the image to be displayed
{{{link}}} Set the page to link
If set to none, no link will be added
{{{text}}} or {{{2}}} Set the text to be displayed

Examples

Code Result
{{iconlink|Bread}} Bread.png Bread
{{iconlink|Apple}} Apple.png Apple
{{iconlink|Cobblestone}} Cobblestone.png Cobblestone
{{iconlink|Glass}} Glass.png Glass
{{iconlink|Lava}} Lava.png Lava
{{iconlink|image=Steel Pickaxe.png|Pickaxe}} Steel Pickaxe.png Pickaxe