Template:Clickable button/doc: Difference between revisions
Template page
More actions
mNo edit summary |
Fix language-code links to use Wikipedia interwiki prefixes Tag: Manual revert |
||
| (7 intermediate revisions by 5 users not shown) | |||
| Line 1: | Line 1: | ||
{{tracked| | {{tracked|T39744}} | ||
{{TemplateBox | {{TemplateBox | ||
|1=target | |1=target | ||
| Line 43: | Line 43: | ||
|name=Clickable button | |name=Clickable button | ||
|desc=Provides a button with hover effects. | |desc=Provides a button with hover effects. | ||
|namespace=all | |||
|usergroup=all | |||
|placement= | |||
|usage-notes= | |||
---- | ---- | ||
:<code><nowiki>{{Clickable button|FAQ|Frequently asked questions}}</nowiki></code> → | :<code><nowiki>{{Clickable button|FAQ|Frequently asked questions}}</nowiki></code> → | ||
| Line 50: | Line 54: | ||
::: {{Clickable button|target={{fullurl:{{FULLPAGENAME}}|withJS=MediaWiki:VisualFileChange.js}}|text=This page with '''VisualFileChange'''|external=true}} | ::: {{Clickable button|target={{fullurl:{{FULLPAGENAME}}|withJS=MediaWiki:VisualFileChange.js}}|text=This page with '''VisualFileChange'''|external=true}} | ||
---- | ---- | ||
: <code><nowiki>{{Clickable button|:en:Wikipedia:Manual of Style/Layout|'''Wikipedia's manual of Style'''|class=ui-button-green ui-button-large}}</nowiki></code> → | : <code><nowiki>{{Clickable button|ww:en:Wikipedia:Manual of Style/Layout|'''Wikipedia's manual of Style'''|class=ui-button-green ui-button-large}}</nowiki></code> → | ||
::: {{Clickable button|:en:Wikipedia:Manual of Style/Layout|'''Wikipedia's manual of Style'''|class=ui-button-green ui-button-large}} | ::: {{Clickable button|ww:en:Wikipedia:Manual of Style/Layout|'''Wikipedia's manual of Style'''|class=ui-button-green ui-button-large}} | ||
---- | ---- | ||
: <code><nowiki>{{Clickable button|:en:Wikipedia:Twinkle/Preferences|'''Twinkle preferences'''|iconPrimary=ui-icon-wrench|class=ui-button-blue ui-button-large}}</nowiki></code> → | : <code><nowiki>{{Clickable button|ww:en:Wikipedia:Twinkle/Preferences|'''Twinkle preferences'''|iconPrimary=ui-icon-wrench|class=ui-button-blue ui-button-large}}</nowiki></code> → | ||
::: {{Clickable button|:en:Wikipedia:Twinkle/Preferences|'''Twinkle preferences'''|iconPrimary=ui-icon-wrench|class=ui-button-blue ui-button-large}} | ::: {{Clickable button|ww:en:Wikipedia:Twinkle/Preferences|'''Twinkle preferences'''|iconPrimary=ui-icon-wrench|class=ui-button-blue ui-button-large}} | ||
---- | ---- | ||
: <code><nowiki>{{Clickable button|target={{fullurl:Special:Random/User talk|action=edit§ion=new&preloadtitle=I+love+your+work+because}}|text=Do something good|iconSecondary=ui-icon-heart|external=true|class=ui-button-red}}</nowiki></code> → | : <code><nowiki>{{Clickable button|target={{fullurl:Special:Random/User talk|action=edit§ion=new&preloadtitle=I+love+your+work+because}}|text=Do something good|iconSecondary=ui-icon-heart|external=true|class=ui-button-red}}</nowiki></code> → | ||
::: {{Clickable button|target={{fullurl:Special:Random/User talk|action=edit§ion=new&preloadtitle=I+love+your+work+because}}|text=Do something good|iconSecondary=ui-icon-heart|external=true|class=ui-button-red}} | ::: {{Clickable button|target={{fullurl:Special:Random/User talk|action=edit§ion=new&preloadtitle=I+love+your+work+because}}|text=Do something good|iconSecondary=ui-icon-heart|external=true|class=ui-button-red}} | ||
|type=formatting | |type=formatting | ||
|example= | |example= | ||
| Line 71: | Line 70: | ||
* {{tl|Clickable button 2}} (import from de.wikipedia) | * {{tl|Clickable button 2}} (import from de.wikipedia) | ||
* {{tl|key press}} | * {{tl|key press}} | ||
* {{tl|Clickable button 3}} | |||
|setscats= | |setscats= | ||
|lines=1 | |lines=1 | ||
Latest revision as of 14:46, 15 August 2026
Provides a button with hover effects.
Usage
{{Clickable button |target= |text= |external= }}
{{Clickable button|target={{fullurl:{{FULLPAGENAME}}|withJS=MediaWiki:VisualFileChange.js}}|text=This page with '''VisualFileChange'''|external=true}}→
{{Clickable button|ww:en:Wikipedia:Manual of Style/Layout|'''Wikipedia's manual of Style'''|class=ui-button-green ui-button-large}}→
{{Clickable button|ww:en:Wikipedia:Twinkle/Preferences|'''Twinkle preferences'''|iconPrimary=ui-icon-wrench|class=ui-button-blue ui-button-large}}→
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
target1 | The target page of the "button". For external links, however, it is recommended using the named parameter target. Please use named parameters if it is an external link because they often contain = which would confuse the parser. | empty | required | |
text2 | Text (caption) the button should carry. Either you specify text or an icon. | empty | required | |
external3 | Is this an external link? If it is, set to yes or aye, or whatever you like, except nothing. | empty | optional | |
iconPrimary4 | A jquery UI icon class for the primary icon (in LTR languages on the left side of the button label/text). E.g. ui-icon-gear[1] | empty | optional | |
iconSecondary5 | A jquery UI icon class for the secondary icon (in LTR languages on the right side of the button label/text). E.g. ui-icon-triangle-1-s | empty | optional | |
class | Add classes like ui-button-green ui-button-large | empty | optional | |
id | Unique id to be used as the button's ID-Attribute. Useful for JavaScript-binding and CSS-styling. | empty | optional | |
Additional information
The template is intended to be used in the following namespaces: all namespaces
The template is intended to be used by the following user groups: all users
Relies on:
See also
- {{Button}} (works without JS enabled)
- {{Clickable button 2}} (import from de.wikipedia)
- {{Key press}}
- {{Clickable button 3}}
Localization
This template is not intended to be localized.
Test suite/ Unit tests
| Icon only | |||
| Icon text | |||
| Text only, links | |||
| Colors |