Template:Button/doc

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

This template provides a "clickable button" formatting style for text. It is not clickable, and care should be taken when using it to avoid readers thinking the result may be. (It has an explanatory tooltip for users hovering over it, but that may not always be displayed, or only displayed after too long a delay, so that it may not show up to people trying to click it.)

Usage

{{Button |1= }}

Template parameters

<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. ‎<nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw ‎<templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.


Wikipedia's help about TemplateDataCommons-specific information

This template provides a "clickable button" formatting style for text. It is NOT clickable, and care should be taken when using it to avoid readers thinking the result may be. (It has an explanatory tooltip for users hovering over it, but that may not always be displayed, or only displayed after too long a delay, so that it may not show up to people trying to click it.)

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
text1 text

The button text

Default
the button
Stringrequired
formatformat

Set to “bold” to make the button text bold

Suggested values
bold
Lineoptional
popuppopup

Set to any value to disable the popup explaining users that the button is not clickable. Useful for example if there is another popup the explanation would conflict with.

Lineoptional
extra stylestyle

Any extra CSS style for the button.

Lineoptional

Additional information

The template is intended to be used in the following namespaces: no namespace specified

The template is intended to be used by the following user groups: no user group specified

Example

{{Button|button text|format=bold}}

renders as:

button text

See also