This page is semi-protected against editing.

Template:Shortcut2

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Shortcut
Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:Shortcut2/doc.

Produce a box floating right suited for shortcuts to sections.

Usage

{{shortcut2 |1= |2= |3= }}

This template is restricted to three parameters.

Template parameters

ParameterDescriptionDefaultStatus
1shortcut nameemptyrequired
2shortcut nameemptyoptional
3shortcut nameemptyoptional
langdisplay languageFix language code. Useful on translated Commons namespace pages, or in other translated templates.{{int:lang}}optional
bgbackground colorCSS background color of the box.whiteoptional
borderborder colorCSS border color of the box.#cccoptional
<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

Produce a box floating right suited for shortcuts to sections.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
shortcut name1

Page namerequired
shortcut name2

Page nameoptional
shortcut name3

Page nameoptional
background colorbg

CSS background color of the box.

Default
white
Lineoptional
border colorborder

CSS border color of the box.

Default
#ccc
Lineoptional
display languagelang

Fix language code. Useful on translated Commons namespace pages, or in other translated templates.

Default
{{int:lang}}
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

Relies on:

Example

{{shortcut2|COM:SAND|COM:SANDBOX|COM:SB}}{{Lorem}}

renders as:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

See also

Localization

This template is not intended to be localized.

The “Shortcut” text is translated at {{Shortcut text}}.