Please note that some information on this wiki is still based on the demo version.
If you notice any errors, feel free to correct them.
Template:Button: Difference between revisions
From Super Fantasy Kingdom Official Wiki
wgg>Cadaei updated css classes |
m 8 revisions imported |
||
| (4 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly>{{#switch:{{{t}}} | <includeonly>{{#vardefine:iconClass|{{#if:{{{iconClass|}}}|{{!}}class={{{iconClass}}}}}}}{{#switch:{{{t}}} | ||
|icon2=<div class="link-button"><div | |icon2=<div class="link-button"><div>[[File:{{{1}}}|link={{{2}}}{{#var:iconClass}}]]</div><div class="link-button-text">[{{{2}}} {{{3}}}]</div></div> | ||
|icon=<div class="link-button"><div | |icon=<div class="link-button"><div>[[File:{{{1}}}|link={{{2}}}{{#var:iconClass}}]]</div><div class="link-button-text">[[{{{2}}}|{{{3|{{{2}}}}}}]]</div></div> | ||
|#default =<div class="link-button" style="width:{{{w|94}}}px">[[{{{1}}}|{{{2|{{{1}}}}}}]]</div> | |#default =<div class="link-button" style="width:{{{w|94}}}px">[[{{{1}}}|{{{2|{{{1}}}}}}]]</div> | ||
}}</includeonly><noinclude>{{doc}} | }}</includeonly><noinclude>{{doc}} | ||
[[Category:Formatting templates]]</noinclude> | [[Category:Formatting templates]]</noinclude> | ||
Latest revision as of 23:46, 21 October 2025
Displays a button that links to a page, optionally with an image.
Parameters
iconClass: optional classes for the icon
Exclusive parameters
t: (no value, empty)1: page name where the button links to2: optional text that is displayed instead of1
t: icon1: image file name2: page name for the link3: optional different name of the link texti: optional width of the image
t: icon21: image file name2: url for an external link3: name of the link texti: optional width of the image
Example
{{Button|Frontpage-units.png|Units|t=icon}}


