Minecraft Wiki

The Minecraft Wiki has moved from Fandom; see the linked discussion page for details.

READ MORE

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

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

Usage

Gear (item)
This section is a work in progress. 
Please help in the expansion or creation of this template by expanding or improving it. The talk page may contain suggestions.
Note:
* Add the missing info about the 3 parameters using an "?"
* Make a proper parameters section, explaining their usage.
** It should use a templatedata table.
{{Message box
|mini = Mini mode
|small = Mini mode
|class = Classes for the template
|bgcol = Custom background color
|linecol = Custom line color
|width = Custom width
|float = Custom alignment
|icon = Icon from [[Template:CommentSprite]]
|imagecss = ?
|image = Extra image
|imagetextbefore = ?
|imagetextafter = ?
|imagesize = Image size changer
|title = Template title text
|discuss = Discuss button enabler
|discussPage = Talk page changer
|discussAnchor = Talk page section specifier
|linkshere = Links 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

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

Booleanoptional
Mini modesmall

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

Booleanoptional
Classclass

Adds a class to the template.

Stringsuggested
Background colorbgcol

Changes the background color.

Booleanoptional
Line colorlinecol

Changes the line color.

Booleanoptional
Widthwidth

Changes the template width.

Booleanoptional
Alignmentfloat

Changes the template position.

Booleanoptional
Template iconicon

Adds a icon from [[Template:CommentSprite]]. Not compatible with {{cd|image}} nor its variants.

Booleanoptional
?imagecss

?.

Booleanoptional
Template imageimage

Adds a image to the template.

Booleanoptional
?imagetextbefore

?.

Booleanoptional
?imagetextafter

?.

Booleanoptional
Image sizeimagesize

Changes the image size if there is one.

Booleanoptional
Title texttitle

Adds a title to the template.

Stringsuggested
Button enablerdiscuss

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

Booleanoptional
Talk page changerdiscussPage

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

Booleanoptional
Talk page section specifierdiscussAnchor

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

Booleanoptional
Button enablerlinkshere

Adds a button called [Links] which shows what pages use/link to the message box on [[Special:WhatLinksHere/]].

Booleanoptional
Texttext

Adds text to the template.

Stringsuggested
Css customizercss

Changes the css style of the template to a custom one.

Booleanoptional

Color criteria

When a template uses Message boxes to make its contents, it must follow a certain color criteria if it belongs to any of the following criteria:

Criteria Class code Color displayed
Unclassified templates (default)
Warning for disclaimer/deletion of a page class = msgbox-red
Suggesting a page to be moved/split/merged class = msgbox-purple
Notice for maintenance/editing-related actions of a page class = msgbox-yellow
Information regarding the status of a page class = msgbox-green
Information regarding the content of a page class = msgbox-orange
Details about editions and/or versions class = msgbox-blue
Unused/Custom purposes class = msgbox-magenta

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;
}}
Bot
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 = Bot.png
| 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.
}}
Bot
This is a mini message box, it is using similar settings as the box used in the advanced example above.
Advertisement