Template:Msgbox/doc
Jump to navigation
Jump to search
This template displays a basic message box.
Usage
All parameters are optional.
{{msgbox | class = <css classes> | style/css = <css styles> | width = <box width> | image = <personal image choice> | imagesize = <image size> | imagelink = <image link> | imagetext = <image alt text> | imagealt = <completely custom image display> | discuss = y/yes | discusspage = <discuss page> | discussanchor <discuss section name> | title = <box title> | text = <box text> }}
Parameter | Description | Type | Status | |
---|---|---|---|---|
CSS class | class | Custom CSS class
| Line | optional |
CSS style | style css | Line | optional |
|
Background color | bgcol | Background color of the box
| Line | deprecated see below |
Box width | width | Width of the box
| Line | optional |
Box image | image | Image that is displayed in the box on the left
| File | optional |
Image size | imagesize | Size of the $image
| Line | optional |
Image link | imagelink | The page that $image will link to | Line | optional |
Image text | imagetext | Alt text for $image | Line | optional |
Custom image | imagealt | Completely custom image display; overrides $image and $imagesize | Unbalanced wikitext | optional |
Discuss option | discuss | Adds a link to the current page's talk page (or $discusspage ); only has an effect if a $title is set | Boolean | optional |
Discuss link | discusspage | The page that $discuss will link to | Line | optional |
Discuss anchor | discussanchor | The section on the page that $discuss will link to | Line | optional |
Box title | title | Title of the box | String | optional |
Main text | text | Text inside the box | Unbalanced wikitext | suggested |
Examples
For compatibility with wiki.gg's theme, hardcoded background/border colors should be avoided. Instead, use one of the predefined classes listed below, which are styled for the different themes.
Code | Result |
---|---|
{{msgbox|text=Message box text|class=msgbox-color-blue}}
|
|
{{msgbox|text=Message box text|class=msgbox-color-red}}
|
|
{{msgbox|text=Message box text|class=msgbox-color-purple}}
|
|
{{msgbox|text=Message box text|class=msgbox-color-green}}
|
|
{{msgbox|text=Message box text|class=msgbox-color-yellow}}
|
|
{{msgbox|text=Message box text|class=msgbox-color-orange}}
|
|
{{msgbox|text=Message box text|class=msgbox-color-pink}}
|
|
{{msgbox|text=Message box text}}
|