This page is protected against editing.

Template:Tmbox

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

This is the talk message box meta-template, mainly used by other templates to create consistent message boxes for discussion pages.

Usage

{{Tmbox
 |type =
 |image =
 |imageright =
 |class =
 |style =
 |textstyle =
 |text =
 |small =
 |lang =
}}

Template parameters

ParameterDescriptionDefaultStatus
typetypeType of the box (speedy, delete, content, style, move, protection or notice), affects the colors and the default image of the boxnoticeoptional
image
smallimage
main imageThe image that appears on the left of the template (on the right in right-to-left context), using full image syntax (e.g. [[File:Some image.svg|40px]]), or the special value none to completely hide the image. The default image depends on the box type (see below).emptyoptional
imageright
smallimageright
secondary imageThe image that appears on the right of the template (on the left in right-to-left context), using full image syntax (e.g. [[File:Some image.svg|40px]]), by default nothing.emptyoptional
classCSS classSpace-separated list of additional CSS classes for the whole boxemptyoptional
styleCSS styleSemicolon-separated list of additional inline CSS rules for the whole boxemptyoptional
textstyletext CSS styleSemicolon-separated list of additional inline CSS rules for the text cellemptyoptional
text
smalltext
textThe message itselfemptyrequired
smallsmallSet to “yes” to make the box smaller and right-alignedemptyoptional
langlanguageLanguage of the box’s content, affects layout e.g. for right-to-left or East Asian languagesemptysuggested
Template data
<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

This is the talk message box meta-template, mainly used by other templates to create consistent message boxes for discussion pages.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
CSS classclass

Space-separated list of additional CSS classes for the whole box

Lineoptional
main imageimage smallimage

The image that appears on the left of the template (on the right in right-to-left context), using full image syntax (e.g. [[File:Some image.svg|40px]]), or the special value “none” to completely hide the image. The default image depends on the box type (see on the template page).

Contentoptional
secondary imageimageright smallimageright

The image that appears on the right of the template (on the left in right-to-left context), using full image syntax (e.g. [[File:Some image.svg|40px]]), by default nothing.

Contentoptional
languagelang

Language of the box’s content, affects layout e.g. for right-to-left or East Asian languages

Linesuggested
smallsmall

Set to “yes” to make the box smaller and right-aligned

Lineoptional
CSS stylestyle

Semicolon-separated list of additional inline CSS rules for the whole box

Lineoptional
texttext smalltext

The message itself

Contentrequired
text CSS styletextstyle

Semicolon-separated list of additional inline CSS rules for the text cell

Lineoptional
typetype

Type of the box (speedy, delete, content, style, move, protection or notice), affects the colors and the default image of the box

Default
notice
Lineoptional

Additional information

The template is intended to be used in the following namespaces: all talk namespaces and noticeboards

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

Relies on:
{{Tmbox/core}}

Example

{{Tmbox|type = speedy
 |image = [[File:Example en.svg|30px]]
 |imageright = [[File:Example.svg|30px]]
 |style = border-style:dotted
 |textstyle = font-style:italic
 |text = This is the text
 |small = yes
}}

renders as:

See also

Localization

This template is not intended to be localized.

Styles

Possible styles of the template with their default images: