Last edited 2 years ago
by Demo writer

Template:ButtonLink: Difference between revisions

hw>Cosborne
(Created page with "<noinclude>Inspired by https://www.mediawiki.org/wiki/Template:Clickable_button_2 </noinclude><includeonly><span class="plainlinks">{{#if:{{{1|}}}|{{{1}}}|<span role="butto...")
 
m (1 revision imported)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>Inspired by https://www.mediawiki.org/wiki/Template:Clickable_button_2
<noinclude>Inspired by https://www.mediawiki.org/wiki/Template:Clickable_button_2
</noinclude><includeonly><span class="plainlinks">{{#if:{{{1|}}}|[[{{{1}}}|<span role="button" class="mw-ui-button">{{{2}}}</span>]]|[{{{url}}} <span role="button" class="mw-ui-button">{{{2}}}</span>]}}</span></includeonly>
</noinclude><includeonly>{{#ifeq:{{#switch: {{{external}}}|yes|ja=yes}} |yes|<span class="plainlinks">[{{{target}}} <span role="button" class="mw-ui-button {{#switch: {{{format}}}|blue|blau=mw-ui-progressive|red|rot=mw-ui-destructive|}}">{{{label}}}</span>]</span>|[[{{{target}}}|<span role="button" class="mw-ui-button {{#switch: {{{format}}}|blue|blau=mw-ui-progressive|red|rot=mw-ui-destructive|}}">{{{label}}}</span>]]}}</includeonly>
<noinclude>
<templatedata>
{
"params": {
"external": {
"label": {
"en": "Is this an external link?",
"de": "Ist dies ein externer Link?"
},
"description": {
"en": "Link needs to start with http:// or https://",
"de": "Ein externer Link beginnt mit http:// oder https://"
},
"example": {
"en": "no, yes",
"de": "ja, nein"
},
"default": {
"en": "no",
"de": "nein"
},
"type": "boolean",
"suggested": true
},
"target": {
"label": {
"en": "Link target",
"de": "Zielseite"
},
"required": true
},
"label": {
"label": {
"en": "Label ",
"de": "Bezeichnung"
},
"required": true
},
"format": {
"label": {
"en": "Background color (leave empty for white)",
"de": "Hintergrundfarbe (für weiß leer lassen)"
},
"example": {
"en": "blue, red",
"de": "rot, blau"
},
"suggested": true
}
},
"description": {
"en": "Styles a text link as button",
"de": "Formatiert einen Textlink als Button."
}
}
</templatedata>
</noinclude>

Latest revision as of 08:34, 8 September 2022

Inspired by https://www.mediawiki.org/wiki/Template:Clickable_button_2


Styles a text link as button

Template parameters

ParameterDescriptionTypeStatus
Is this an external link?external

Link needs to start with http:// or https://

Default
no
Example
no, yes
Booleansuggested
Link targettarget

no description

Unknownrequired
Label label

no description

Unknownrequired
Background color (leave empty for white)format

no description

Example
blue, red
Unknownsuggested