SimpleButton: Difference between revisions
From Project Rebearth
Created page with "<noinclude> <templatestyles src="SimpleButton/styles.css" /> {{SimpleButton|Example Button|link=Main Page}} == Usage == <pre> {{SimpleButton|Button text|link=Page name}} </pre> == Parameters == ; <code>1</code> : The text displayed on the button. ; <code>link</code> : The wiki page the button links to. == Example == <pre> {{SimpleButton|Explore Buildings|link=Buildings}} </pre> === Result === {{SimpleButton|Explore Buildings|link=Buildings}} Category:Navigation te..." |
No edit summary |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<noinclude> | <includeonly><templatestyles src="SimpleButton/styles.css" /><span class="mp-button">{{#if:{{{icon|}}}|[[File:{{{icon}}}|16px|link={{{link}}}|class=mp-button-icon]]}}[[{{{link}}}|{{{1}}}]]</span></includeonly><noinclude> | ||
<templatestyles src="SimpleButton/styles.css" /> | <templatestyles src="SimpleButton/styles.css" /> | ||
{{SimpleButton|Example Button|link=Main Page}} | {{SimpleButton|Example Button|link=Main Page}} | ||
{{SimpleButton|With Icon|link=Main Page|icon=Resources.png}} | |||
== Usage == | == Usage == | ||
<pre> | <pre> | ||
{{SimpleButton|Button | {{SimpleButton|Button Text|link=Page Name}} | ||
{{SimpleButton|Button Text|link=Page Name|icon=Resources.png}} | |||
</pre> | </pre> | ||
| Line 11: | Line 13: | ||
; <code>1</code> : The text displayed on the button. | ; <code>1</code> : The text displayed on the button. | ||
; <code>link</code> : The wiki page the button links to. | ; <code>link</code> : The wiki page the button links to. | ||
; <code>icon</code> : ''(Optional)'' Filename of an image to display as an icon to the left of the button text. | |||
== | == Examples == | ||
<pre> | <pre> | ||
{{SimpleButton|Explore Buildings|link=Buildings}} | {{SimpleButton|Explore Buildings|link=Buildings}} | ||
{{SimpleButton|Resources|link=Resources|icon=Resources.png}} | |||
</pre> | </pre> | ||
== Result == | |||
{{SimpleButton|Explore Buildings|link=Buildings}} | {{SimpleButton|Explore Buildings|link=Buildings}} | ||
{{SimpleButton|Resources|link=Resources|icon=Resources.png}} | |||
[[Category:Navigation templates]] | [[Category:Navigation templates]] | ||
</noinclude | </noinclude> | ||
Latest revision as of 19:03, 9 February 2026
Usage
[edit]{{SimpleButton|Button Text|link=Page Name}}
{{SimpleButton|Button Text|link=Page Name|icon=Resources.png}}
Parameters
[edit]1- The text displayed on the button.
link- The wiki page the button links to.
icon- (Optional) Filename of an image to display as an icon to the left of the button text.
Examples
[edit]{{SimpleButton|Explore Buildings|link=Buildings}}
{{SimpleButton|Resources|link=Resources|icon=Resources.png}}
Result
[edit]