Template:Ombox
This template produces a stylized, full-width message box suitable for use on pages outside of the Main namespace, such as Category:, Template: and User:, and their corresponding talk namespaces.
Usage
The template is shown below with its full complement of parameters for copy/pasting into other pages.
{{Ombox|type= |image= |imageright= |class= |style= |small= |lang= |dir= |textstyle= |text= }}
Types
The overall appearance of the message box, such as its coloring and the image shown at left, are controlled by the |type = parameter. All of its valid values are demonstrated below.
{{Ombox|type=notice}}(default)
| This is the notice message box style. If the type parameter is not defined or is assigned an invalid value, this style will be used, which is defined by the CSS3 declaration: border: 1px solid #a2a9b1; . |
{{Ombox|type=content}}
| This is the content message box style, which is defined by the CSS3 declaration: border: 1px solid #f28500; . |
{{Ombox|type=style}}
| This is the style message box style, which is defined by the CSS3 declaration: border: 1px solid #fc3; . |
{{Ombox|type=move}}
| This is the move message box style, which is defined by the CSS3 declaration: border: 1px solid #9932cc; . |
{{Ombox|type=protection}}
| This is the protection message box style, which is defined by the CSS3 declaration: border: 2px solid #a2a9b1; . |
{{Ombox|type=delete}}
| This is the delete message box style, which is defined by the CSS3 declaration: border: 2px solid #b32424; . |
{{Ombox|type=speedy}}
| This is the speedy message box style, which is defined by the CSS3 declarations: background-color: #fee7e6; border: 2px solid #b32424; . |
Compact layout
| This is the Ombox template's compact style. |
Images
| A useful collection of modern icons published under a license compatible with OSM Wiki and suited for use with this template can be found on the Mediawiki OOUI icon gallery page at Wikimedia Commons. |
Right-hand image
| The imageright parameter can also be used in tandem with |small = yes. |
| This is an example of the appearance produced by using the imageright parameter. |
Suppressing image use
If you wish to use this template to produce a message box without an icon near the left edge, that can be accomplished with the parameter assignment |image = none.
| The |image = none parameter value works well in concert with |type = speedy to produce a high-visibility message box without the standard cautionary implications. |
| Suppressing the left-hand image with |image = none has no impact on the use of the imageright parameter, as you can see here with this |type = protection message box. |
TemplateData
Produces a stylized, full-width message box suitable for placement on page outside of the Main namespace
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Message type | type | Selects the primary (left side) icon and color palette of the message box
| Line | suggested |
| Message | text | The text of the message the box is meant to highlight, formatted as wikitext
| String | required |
| Message style | textstyle | Custom styling for the message text, formatted as valid CSS3 declarations with terminating semicolons
| Line | optional |
| Icon (primary) | image | The filename of an image to be shown on the left side of the message box in place of the default image derived from the value of the 'type' parameter; do not include the 'File:' namespace prefix. | File | optional |
| Icon (right) | imageright | The filename of an image to be shown on the right side of the message box; do not include the 'File:' namespace prefix. | File | optional |
| Compact layout | small | When set to 'yes', alters the box's layout to produce a more compact and less obtrusive appearance
| Boolean | optional |
| Custom box styling | style | The style of the message box can be customized with the assignment of valid CSS3 declarations as the value of this parameter; do not enclose them in quotation marks, but do ensure they are all terminated with a semicolon.
| Line | optional |
| Custom box class | class | Accepts a space-delimited list of additional CSS3 classes to assign to the message box
| Line | optional |
| Language code | lang | If the message text is in a language that does not match the page it appears on, the ISO 639-1 language code for the text should be used as the value for this parameter to ensure it is properly parsed
| Line | optional |
| Text direction | dir | If the message box text is in a language that is written in a different direction than the rest of the page it appears on, declare its direction here to ensure it is displayed as intended
| Line | optional |
| Compact image | smallimage | This parameter is deprecated and no longer has any impact on the template's output | File | deprecated |
| Compact image (right) | smallimageright | This parameter is deprecated and no longer has any impact on the template's output | File | deprecated |
| Compact message text | smalltext | This parameter is deprecated and no longer has any impact on the template's output | String | deprecated |
See also
- {{Ambox}}
- Category:Message box templates
- Recommended icon categories at Wikimedia Commons: