This page is protected against editing.

Template:Boxboxtop

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

Collect userboxes into a single column grouping easily. Requires {{Boxboxbottom}} as a partner template.

Usage

{{Boxboxtop |1= |2= |bordercolor= |backgroundcolor= |extra-css= |toptext-css= }}

Needs a {{Boxboxbottom}} at the bottom. Otherwise you'll run in danger of weird issues due to unbalanced HTML tags!

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.

Discussion
There is an ongoing discussion about that matter. Feel invited to comment if you are experienced in either way, your time permits and if you like to share your opinion or to make a suggestion.


Wikipedia's help about TemplateDataCommons-specific information

To collect userboxes into a single column grouping easily. Requires {{Boxboxbottom}} as a partner template.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
1 toptext header

header for box

Default
[[Commons:Userboxes|Userboxes]]
Stringoptional
2 float align

box alignment (float)

Default
right
Lineoptional
backgroundcolor

box background colour

Default
FFFFFF
Lineoptional
bordercolor

box border colour

Default
99B3FF
Lineoptional
extra-css

extra CSS formatting for whole box

Lineoptional
toptext-css

CSS for header text

Lineoptional

Additional information

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

The template is intended to be used by the following user groups: all users

Example

{{Boxboxtop|extra-css=box-shadow: 1px 2px 2px #000;}}

renders as:

Userboxes

Localization

To add your language to the list of languages supported by this template, please edit the template and add a row to the "{{LangSwitch|}}" construct. It takes the form "|xx= Your translation " (xx being the code of your language)

The one and only word is being translated on Template:Boxboxtop/i18n.

Usage

{{Boxboxtop
| toptext = 
| float = 
| bordercolor = 
| backgroundcolor = 
| extra-css = 
| toptext-css = 
}}

"your userboxes"

{{Boxboxbottom
| bottomtext = 
}}

All of the parameters are optional.

You may insert breaks by using {{Userboxbreak}}. See that template for details.

Hiding userboxes

You can hide userboxes which utilize this (as well as a few other) forms of template-based userbox organization. Simply edit your userspace CSS override (for example, monobook.css for the Monobook skin) and add the following–

#userboxes { display: none; }

See also