Last edited 2 years ago
by Demo writer

Template:ButtonLink: Difference between revisions

m (1 revision imported)
hw>WikiSysop
No edit summary
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>

Revision as of 15:10, 15 March 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