Template:Message box/doc: Difference between revisions

From Deadlock Wiki
Jump to navigation Jump to search
add info
m added templatedata
Line 2: Line 2:
This template is used to create message boxes for articles. It should be used as a meta template to build other message box templates, but it can be used standalone. For a list of other message boxes, see [[:Category:Message box templates]].
This template is used to create message boxes for articles. It should be used as a meta template to build other message box templates, but it can be used standalone. For a list of other message boxes, see [[:Category:Message box templates]].


== Examples ==
== Example ==
<pre style="width:50%">
<pre style="width:50%">
{{Message box
{{Message box
| bgcolor = #f8f7f5
  | image   = Bebop MM.png
| bdcolor = #e1d2b3
  | notice = Primary notice text.
  | image = Bebop MM.png
  | notice2 = Secondary notice text.
  | quote = Optional quote.
  | notes   = Additional notes.
  | notice = This is a notice.
  | notice2 = Optional text.
  | notes = Optional notes.
}}
}}
</pre>
</pre>


{{Message box
{{Message box
| bgcolor = #f8f7f5
  | image   = Bebop MM.png
| bdcolor = #e1d2b3
  | notice = Primary notice text.
  | image = Bebop MM.png
  | notice2 = Secondary notice text.
  | quote = Optional quote.
  | notes   = Additional notes.
  | notice = This is a notice.
  | notice2 = Optional text.
  | notes = Optional notes.
}}
}}


<pre style="width:50%">
<templatedata>
{{Message box
{
| bgcolor = #f8f7f5
"params": {
| bdcolor = #e1d2b3
"border": {
| notice = This is a notice.
"type": "string",
}}
"default": "#e1d2b3",
</pre>
"description": "Hex color for the left border."
 
},
{{Message box
"image": {
| bgcolor = #f8f7f5
"type": "wiki-file-name",
| bdcolor = #e1d2b3
"description": "Image to be displayed."
| notice = This is a notice.
},
}}
"quote": {
<includeonly>[[Category:Message box templates| ]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>
"type": "content",
"description": "Character quote."
},
"notice": {
"type": "content",
"description": "Primary notice text.",
"required": true
},
"notice2": {
"type": "content",
"description": "Secondary notice text."
},
"notes": {
"type": "content",
"description": "Additional notes."
}
},
"format": "block",
"description": " "
}
</templatedata><includeonly>[[Category:Message box templates| ]]</includeonly>
<noinclude>[[Category:Template documentation]]</noinclude>

Revision as of 03:33, 4 December 2024

Usage

This template is used to create message boxes for articles. It should be used as a meta template to build other message box templates, but it can be used standalone. For a list of other message boxes, see Category:Message box templates.

Example

{{Message box
 | image   = Bebop MM.png
 | notice  = Primary notice text.
 | notice2 = Secondary notice text.
 | notes   = Additional notes.
}}

Primary notice text.
Secondary notice text.
Notes: Additional notes.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
borderborder

Hex color for the left border.

Default
#e1d2b3
Stringoptional
imageimage

Image to be displayed.

Fileoptional
quotequote

Character quote.

Contentoptional
noticenotice

Primary notice text.

Contentrequired
notice2notice2

Secondary notice text.

Contentoptional
notesnotes

Additional notes.

Contentoptional