Jump to content

Template:Clickable button/doc: Difference between revisions

From Wiki - Scioly.org
Pi-Bot (talk | contribs)
m Removing the TemplateDocStart template from documentation for formatting purposes.
Updated documentation
 
Line 3: Line 3:


== Parameters ==
== Parameters ==
:<code><nowiki>1</nowiki></code> - the text of the button
:<code><nowiki>1</nowiki></code> - the page to link to, shown in the button text
:<code><nowiki>2</nowiki></code> - the alternate text to use in the button
:<code><nowiki>url</nowiki></code> - the url for the button to link to
:<code><nowiki>url</nowiki></code> - the url for the button to link to
:<code><nowiki>link</nowiki></code> - the wiki page for the button to link to
:<code><nowiki>class</nowiki></code> - either <code>mw-ui-progressive</code> for a blue button, or <code>mw-ui-destructive</code> for a red button


== Usage ==
== Usage ==
Either the <code><nowiki>url</nowiki></code> or <code><nowiki>link</nowiki></code> parameter when creating a button, and the <code><nowiki>1</nowiki></code> parameter should always be used.
You always must supply the first argument, and you can optionally supply the other arguments.


== Examples ==
== Examples ==
Line 14: Line 15:
|-
|-
|<pre>
|<pre>
{{Clickable button|SOINC Website|url=https://www.soinc.org}}
{{Clickable button|Main Page}}
</pre>
</pre>
|{{Clickable button|SOINC Website|url=https://www.soinc.org}}
|{{Clickable button|Main Page}}
|-
|-
|<pre>
|<pre>
{{Clickable button|Need help editing? Click here|link=Help:Editing}}
{{Clickable button|SOINC|url=https://www.soinc.org}}
</pre>
</pre>
|{{Clickable button|Need help editing? Click here|link=Help:Editing}}
|{{Clickable button|SOINC|url=https://www.soinc.org}}
|-
|<pre>
{{Clickable button|Florida|class=mw-ui-progressive}}
</pre>
|{{Clickable button|Florida|class=mw-ui-progressive}}
|-
|<pre>
{{Clickable button|Ohio|Maybe Ohio?|class=mw-ui-destructive}}
</pre>
|{{Clickable button|Ohio|Maybe Ohio?|class=mw-ui-destructive}}
|-
|-
|}
|}

Latest revision as of 03:17, 17 May 2022

The Clickable button template is a template used for generating clickable buttons.

Parameters

1 - the page to link to, shown in the button text
2 - the alternate text to use in the button
url - the url for the button to link to
class - either mw-ui-progressive for a blue button, or mw-ui-destructive for a red button

Usage

You always must supply the first argument, and you can optionally supply the other arguments.

Examples

{{Clickable button|Main Page}}
Main Page
{{Clickable button|SOINC|url=https://www.soinc.org}}
SOINC
{{Clickable button|Florida|class=mw-ui-progressive}}
Florida
{{Clickable button|Ohio|Maybe Ohio?|class=mw-ui-destructive}}
Maybe Ohio?