Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Mbox/doc: Difference between revisions

Template page
m Reverted edits by DieBuche (talk) to last revision by Rocket000
use {{TemplateBox}}; "textalign" parameter changed to "textstyle"
Line 1: Line 1:
{{Documentation subpage}}
{{TemplateBox
This is used to create message boxes.
|1        = text
|1d-en    = The text to be displayed.
|1label  = <!-- A (very) brief name for the parameter. -->
|1aliases = <!-- List of aliases, separated by / (a slash) -->
|1type    = string/line
|1def    = <!-- default value for the parameter -->
|1stat    = <!-- required, optional or optional-; optional- means it is optional and omitted in the usage-sample -->


==Parameters==
|2        = type
*text - The text to be displayed.
|2d-en    = Changes the color depending on the message needed. Each has its own preset image.
*type - Changes the color depending on the message needed. Each has its own preset image.
|2label  = <!-- A (very) brief name for the parameter. -->
*image - Override the image.
|2aliases = <!-- List of aliases, separated by / (a slash) -->
*imageright - Show an image on the right side.
|2type    = string
*textalign - Override default centering of text with left or right.
|2def    = notice
*style - Override in custom style overrides for the template using CSS.
|2stat    = <!-- required, optional or optional-; optional- means it is optional and omitted in the usage-sample -->
 
|3        = image
|3d-en    = Override the image ("none" for no image).
|3label  = <!-- A (very) brief name for the parameter. -->
|3aliases = <!-- List of aliases, separated by / (a slash) -->
|3type    = string/wiki-page-name
|3def    = depend on style
|1stat    = <!-- required, optional or optional-; optional- means it is optional and omitted in the usage-sample -->
 
|4        = imageright
|4d-en    = Show an image on the right side.
|4label  = <!-- A (very) brief name for the parameter. -->
|4aliases = <!-- List of aliases, separated by / (a slash) -->
|4type    = string/wiki-page-name
|4def    = <!-- default value for the parameter -->
|4stat    = <!-- required, optional or optional-; optional- means it is optional and omitted in the usage-sample -->
-
|5        = textstyle
|5d-en    = Override default style of text (e.g. centering - "align:left" / "align:right" / "align:center").
|5label  = <!-- A (very) brief name for the parameter. -->
|5aliases = <!-- List of aliases, separated by / (a slash) -->
|5type    = string
|5def    = <!-- default value for the parameter -->
|5stat    = <!-- required, optional or optional-; optional- means it is optional and omitted in the usage-sample -->
 
|6        = style
|6d-en    = Override in custom style overrides for the template using CSS.
|6label  = <!-- A (very) brief name for the parameter. -->
|6aliases = <!-- List of aliases, separated by / (a slash) -->
|6type    = string
|6def    = <!-- default value for the parameter -->
|6stat    = <!-- required, optional or optional-; optional- means it is optional and omitted in the usage-sample -->
 
|7        = lang
|7d-en    = Set the language of the text – it's important for right-to-left languages: their image is on the right and imageright is on the left.
|7label  = <!-- A (very) brief name for the parameter. -->
|7aliases = <!-- List of aliases, separated by / (a slash) -->
|7type    = string
|7def    = <!-- default value for the parameter -->
|7stat    = optional-
 
|name = Mbox
|desc = This is used to create message boxes.
|namespace = all
|usergroup = all
|placement =
|usage-notes =
|type =
|example =
|example-value =
|i18n-method = -
|i18n-desc =
|i18n-mediawiki-msg =
|i18n-subpage =
|seealso =
|setscats =
|print = multi
|shorthand =
|relieson =
|mustbesubst =
|useTemplateData = 1
}}


==Examples==
==Examples==

Revision as of 09:02, 5 January 2014

This is used to create message boxes.

Usage

{{Mbox
 |text =
 |type =
 |image =
 |imageright =
 |textstyle =
 |style =
}}

Template parameters

ParameterDescriptionDefaultStatus
textThe text to be displayed.emptyoptional
typeChanges the color depending on the message needed. Each has its own preset image.noticeoptional
imageOverride the image ("none" for no image).depend on styleoptional
imagerightShow an image on the right side.emptyoptional
textstyleOverride default style of text (e.g. centering - "align:left" / "align:right" / "align:center").emptyoptional
styleOverride in custom style overrides for the template using CSS.emptyoptional
langSet the language of the text – it's important for right-to-left languages: their image is on the right and imageright is on the left.emptyoptional
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. ‎<nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw ‎<templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.


Wikipedia's help about TemplateDataCommons-specific information

This is used to create message boxes.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
image

Override the image ("none" for no image).

Default
depend on style
Page nameoptional
imageright

Show an image on the right side.

Page nameoptional
lang

Set the language of the text – it's important for right-to-left languages: their image is on the right and imageright is on the left.

Stringoptional
style

Override in custom style overrides for the template using CSS.

Stringoptional
text

The text to be displayed.

Lineoptional
textstyle

Override default style of text (e.g. centering - "align:left" / "align:right" / "align:center").

Stringoptional
type

Changes the color depending on the message needed. Each has its own preset image.

Default
notice
Stringoptional

Additional information

The template is intended to be used in the following namespaces: all namespaces

The template is intended to be used by the following user groups: all users

Localization

This template is not intended to be localized.

Examples

The style is different on categories. It uses {{Cmbox}} instead.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.