Minecraft Wiki
[view | edit | history | purge]Documentation

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
| 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
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.

Page nameoptional
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)
Lorem ipsum
Warning for disclaimer/deletion of a page type = delete
Lorem ipsum
Suggesting a page to be moved/split/merged type = move
Lorem ipsum
Notice for content issues of a page type = content
Lorem ipsum
Notice for style issues of a page type = style
Lorem ipsum
Information regarding the status of a page type = notice
Lorem ipsum
Details about editions and/or versions type = edition
Lorem ipsum
Unused/custom purposes type = other
Lorem ipsum

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 has an information icon using [[Template:CommentSprite]]
}}
This has an information icon using Template:CommentSprite
Advanced usage:
{{msgbox
| bgcol = rgba(203, 203, 249, 0.2)
| linecol = rgba(107, 107, 253, 0.2)
| 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 #787878;
}}
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 = rgba(147, 122, 85, 0.2)
| linecol = rgba(187, 116, 13, 0.2)
| css = box-shadow: 0px 0px 6px #787878;
| text = This is using similar settings as the advanced example above.
}}
Bot
This is using similar settings as the advanced example above.

Editors can experiment in this template's sandbox or testcases page.

[view | edit | history | purge]The above documentation is transcluded from Template:Message box/doc.