Minecraft Wiki
Advertisement
Minecraft Wiki
This is the documentation page. It should be transcluded into the main template page. See Template:Documentation for more information

This template is used to add consistent styling to message boxes.

Usage

{{Message box
| mini = Mini mode
| small = Mini mode
| class = Classes for the template
| type = Notice type
| bgcol = Custom background color
| linecol = Custom line color
| width = Custom width
| float = Custom alignment
| icon = Icon from Template:CommentSprite
| imagecss = Custom image CSS
| image = Extra image
| imageisraw = Image is raw
| imagetextbefore = Text before the image
| imagetextafter = Text after the image
| imagesize = Image size
| title = Template title
| discuss = Discuss button
| discussPage = Talk page link
| discussAnchor = Talk page section specification
| linkshere = Links button to Special:WhatLinksHere
| text = Template text
| css = Custom CSS
}}

Parameters

Message boxes are used to create most templates present on the wiki. The following table shows a description of the parameter usage of this template.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Mini modemini small

Changes the message box size to one that is more suited to an article section.

Booleanoptional
Typetype

Message box notice category. See [[#Types]].

Example
<code>type=content</code> for a content issue msgbox
Stringoptional
Classclass

Adds class to the template.

Stringsuggested
Background colorbgcol

Changes the background color.

Default
#FCFCFC
Stringoptional
Line colorlinecol

Changes the line color.

Stringoptional
Widthwidth

Changes the template width.

Default
90%; 30em in mini mode
Stringoptional
Alignmentfloat

Changes the template position.

Stringoptional
Iconicon

Adds an icon from Template:CommentSprite. Incompatible with the {{{image}}} parameter and its derivatives.

Stringoptional
Image CSS customizationimagecss

Further customization of an image on the message box with CSS.

Stringoptional
Imageimage

Adds an image icon to the template. Incompatible with the {{{icon}}} parameter.

Fileoptional
Additional textimagetextbefore

Adds a text before/above the image.

Stringoptional
Additional textimagetextafter

Adds a text after/below the image.

Stringoptional
Image sizeimagesize

Changes the image size if the {{{image}}} parameter is set.

Default
32px; 16px in mini mode
Stringoptional
Image is rawimageisraw

If the image doesn't need the [[File:]] frame around its name

Booleanoptional
Titletitle

Adds a title to the template.

Stringsuggested
Discuss button?discuss

Adds a button named [Discuss] that links to the talk page of the page where the message box is used.

Booleanoptional
Talk page link customizationdiscussPage

Changes the [Discuss] button to link to a custom talk page.

Pageoptional
Talk page section specificationdiscussAnchor

Makes the [Discuss] button to link to a specific section of the talk page.

Stringoptional
Links button?linkshere

Adds a button named [Links] that links to Special:WhatLinksHere which lists the page usage of the current page.

Booleanoptional
Texttext

Adds text to the template.

Contentsuggested
CSS customizationcss

Further customization of the message box with CSS.

Stringoptional

Types

Colors are used to indicate the type of message box:

Criteria Type Color displayed
Unclassified templates (default)
Warning for disclaimer/deletion of a page type = delete
Suggesting a page to be moved/split/merged type = move
Notice for content issues of a page type = content
Notice for style issues of a page type = style
Information regarding the status of a page type = notice
Details about editions and/or versions type = edition
Unused/custom purposes type = other

Examples

Code Result
Basic usage:
{{msgbox
| title = This is a normal message box
| text = With helpful and descriptive subtext
}}
This is a normal message box 
With helpful and descriptive subtext
Mini usage:
{{msgbox
| mini = 1
| icon = 8
| text = This is a mini message box with an information icon using [[Template:CommentSprite]]
}}
This is a mini message box with an information icon using Template:CommentSprite
Advanced usage:
{{msgbox
| bgcol = #eef
| linecol = #ddf
| title = This is a blue message box
| text = It has a discuss link, some custom CSS and a custom image
| discuss = 1
| image = Bot.png
| css = box-shadow: 10px 10px 2px #888;
}}
HAL 9000.png
This is a blue message box [discuss]
It has a discuss link, some custom CSS and a custom image
Advanced mini usage:
{{msgbox
| mini = 1
| image = [[File:Bot.png|25px]]
| imageisraw = 1
| bgcol = #ddc
| linecol = #dcb
| css = box-shadow: 0px 0px 6px #888;
| text = This is a mini message box, it is using similar settings as the box used in the advanced example above.
}}
HAL 9000.png
This is a mini message box, it is using similar settings as the box used in the advanced example above.