Difference between revisions of "Template:MaterialBtn"

From The Powder Toy
Jump to: navigation, search
(Copied from Template:Material, and modified to allow use of anonymous parameter)
 
(Enter a short summary [alt-shift-b])
Line 1: Line 1:
<includeonly>[[Image:{{{mat|}}}{{{1|}}}.png|30px|link=Element:{{{mat|}}}{{{1|}}}|{{{mat}}}{{{1|}}}]]</includeonly><noinclude>Displays the menu-button image for an element, and links it to the element page. Takes one argument, the name of a material.
+
<includeonly>[[Image:{{#if: {{{mat|}}} | {{{mat|}}} | {{{1|}}}}}.png|30px|link=Element:{{#if: {{{mat|}}} | {{{mat|}}} | {{{1|}}}}}]]</includeonly><noinclude>Displays the menu-button image for an element, and links it to the element page. Takes one argument, the name of a material.
 
Example: <nowiki> {{ MaterialBtn | PSCN }} </nowiki> and you will get:
 
Example: <nowiki> {{ MaterialBtn | PSCN }} </nowiki> and you will get:
 
{{ MaterialBtn | PSCN }}
 
{{ MaterialBtn | PSCN }}
 
</noinclude>
 
</noinclude>

Revision as of 14:15, 6 October 2014

Displays the menu-button image for an element, and links it to the element page. Takes one argument, the name of a material. Example: {{ MaterialBtn | PSCN }} and you will get: PSCN.png