Template:Mbox/doc
This is the {{mbox}} or multi namespace message box meta-template.
This meta-template is used to build message box templates that are used on several types of pages and thus need to change style depending on what page they are used on. Based on page type detected it uses one of {{ambox}}, {{tmbox}}, {{imbox}}, {{cmbox}} and {{ombox}}.
Note that this template should only be used for message boxes that really need to adapt their style. Most message boxes do not need this and should use one of {{ambox}}, {{tmbox}}, {{imbox}}, {{cmbox}} or {{ombox}} directly. Using those templates directly means that your template will look the same on its template page and at any other place you show it, which makes it clear on what kind of pages it is supposed to be used. It also gives you access to any extra features those templates offer, and it saves some server load.
Usage
This template takes the same parameters as {{ambox}} and {{imbox}} etc. See full documentation there.
Some of the boxes this template calls only handles images of max 52px width, thus that limitation also applies to this template or you will get ugly padding problems.
Parameters
List of all parameters:
{{mbox
| demospace = {{{demospace|}}} / main / talk / file / category / other
| type = speedy / delete / content / style / notice / move / protection
| image = none / [[File:Some image.svg|40px]]
| imageright = [[File:Some image.svg|40px]]
| style = CSS values
| textstyle = CSS values
| text = The message body text.
| small = {{{small|}}} / left / yes
| smallimage = none / [[Image:Some image.svg|30px]]
| smallimageright = none / [[Image:Some image.svg|30px]]
| smalltext = A shorter message body text.
}}Note: The small parameters only have effect when the template is on an article, talk page or an "other" page. For documentation on the small parameters see {{ambox}}, {{tmbox}} and {{ombox}}. Using the small parameters when they are not valid has no effect, but also does no harm.
TemplateData
This is the specialized version of the {{mbox}} or "multi-namespace message box" meta-template.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Type | type | Adjusts border and background for the appropriate use-case. Default <code>notice</code> is gray with a blue border.
| String | suggested |
| Image (left) | image | no description
| Content | suggested |
| Image (right) | imageright | no description | Content | optional |
| CSS Style | style | no description | String | optional |
| Text CSS Style | textstyle | no description | String | optional |
| Text | text | no description | Content | suggested |
| Small? | small | no description
| Boolean | optional |
| Small Image (left) | smallimage | no description
| Content | optional |
| Small Image (right) | smallimageright | no description
| Content | optional |
| Small Text | smalltext | no description
| Content | optional |
This is the {{mbox}} or “multi namespace message box” meta-template.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Demo namespace | demospace | no description
| String | optional |
| Type | type | no description
| String | suggested |
| Image (left) | image | Do not put in File:, can put "none" for no image.
| Content | suggested |
| Image (right) | imageright | Do not put in File: | Content | optional |
| CSS style | style | no description | String | optional |
| Text CSS style | textstyle | no description | String | optional |
| Text | text | no description | Content | suggested |
| Small? | small | no description
| Boolean | optional |
| Small image (left) | smallimage | no description
| Content | optional |
| Small image (right) | smallimageright | no description
| Content | optional |
| Small text | smalltext | no description
| Content | optional |
Message boxes
| Template | Description |
|---|---|
| {{ambox}} | Article message box, identifies problems or issues with the article |
| {{cmbox}} | Category message box, {{ambox}} for categories |
| {{imbox}} | Image message box, {{ambox}} for file (image) pages |
| {{ombox}} | Other pages message box, {{ambox}} for pages of the types User, Wikipedia, MediaWiki, Template, Help, Portal and any new future namespaces |
| {{tmbox}} | Talk page message box, {{ambox}} for talk pages |
| The following templates are not called by Mbox | |
| {{fmbox}} | used in system messages |
See also
- w:Wikipedia:Classes in Ambox – Describes how to use the ambox CSS classes directly in wikitables and HTML tables.
- w:Wikipedia:Manual of Style/Article message boxes – The style guideline for creating article message boxes.
- w:Wikipedia talk:Manual of Style/Article message boxes – For discussion about these matters.
