Template:Mbox/doc: Difference between revisions
More actions
remove duplicate parameters, test |
→Examples: +1 message (to complete the list) |
||
| Line 2: | Line 2: | ||
|1 = text | |1 = text | ||
|1d-en = The text to be displayed. | |1d-en = The text to be displayed. | ||
|1label = <!-- A (very) brief name for the parameter. --> | |1label = <!-- A (very) brief name for the parameter. --> | ||
|1aliases = <!-- List of aliases, separated by / (a slash) --> | |1aliases = <!-- List of aliases, separated by / (a slash) --> | ||
|1type = string/line | |1type = string/line | ||
| Line 10: | Line 10: | ||
|2 = type | |2 = type | ||
|2d-en = Changes the color depending on the message needed. Each has its own preset image. | |2d-en = Changes the color depending on the message needed. Each has its own preset image. | ||
|2label = <!-- A (very) brief name for the parameter. --> | |2label = <!-- A (very) brief name for the parameter. --> | ||
|2aliases = <!-- List of aliases, separated by / (a slash) --> | |2aliases = <!-- List of aliases, separated by / (a slash) --> | ||
|2type = string | |2type = string | ||
| Line 18: | Line 18: | ||
|3 = image | |3 = image | ||
|3d-en = Override the image ("none" for no image). | |3d-en = Override the image ("none" for no image). | ||
|3label = <!-- A (very) brief name for the parameter. --> | |3label = <!-- A (very) brief name for the parameter. --> | ||
|3aliases = <!-- List of aliases, separated by / (a slash) --> | |3aliases = <!-- List of aliases, separated by / (a slash) --> | ||
|3type = string/wiki-page-name | |3type = string/wiki-page-name | ||
| Line 26: | Line 26: | ||
|4 = imageright | |4 = imageright | ||
|4d-en = Show an image on the right side. | |4d-en = Show an image on the right side. | ||
|4label = <!-- A (very) brief name for the parameter. --> | |4label = <!-- A (very) brief name for the parameter. --> | ||
|4aliases = <!-- List of aliases, separated by / (a slash) --> | |4aliases = <!-- List of aliases, separated by / (a slash) --> | ||
|4type = string/wiki-page-name | |4type = string/wiki-page-name | ||
|4def = <!-- default value for the parameter --> | |4def = <!-- default value for the parameter --> | ||
|4stat = <!-- required, optional or optional-; optional- means it is optional and omitted in the usage-sample --> | |4stat = <!-- required, optional or optional-; optional- means it is optional and omitted in the usage-sample --> | ||
- | - | ||
|5 = textstyle | |5 = textstyle | ||
|5d-en = Override default style of text (e.g. centering - "align:left" / "align:right" / "align:center"). | |5d-en = Override default style of text (e.g. centering - "align:left" / "align:right" / "align:center"). | ||
|5label = <!-- A (very) brief name for the parameter. --> | |5label = <!-- A (very) brief name for the parameter. --> | ||
|5aliases = <!-- List of aliases, separated by / (a slash) --> | |5aliases = <!-- List of aliases, separated by / (a slash) --> | ||
|5type = string | |5type = string | ||
| Line 42: | Line 42: | ||
|6 = style | |6 = style | ||
|6d-en = Override in custom style overrides for the template using CSS. | |6d-en = Override in custom style overrides for the template using CSS. | ||
|6label = <!-- A (very) brief name for the parameter. --> | |6label = <!-- A (very) brief name for the parameter. --> | ||
|6aliases = <!-- List of aliases, separated by / (a slash) --> | |6aliases = <!-- List of aliases, separated by / (a slash) --> | ||
|6type = string | |6type = string | ||
| Line 50: | Line 50: | ||
|7 = lang | |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. | |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. --> | |7label = <!-- A (very) brief name for the parameter. --> | ||
|7aliases = <!-- List of aliases, separated by / (a slash) --> | |7aliases = <!-- List of aliases, separated by / (a slash) --> | ||
|7type = string | |7type = string | ||
| Line 62: | Line 62: | ||
|placement = | |placement = | ||
|usage-notes = | |usage-notes = | ||
|type = | |type = | ||
|example = | |example = | ||
|example-value = | |example-value = | ||
|i18n-method = - | |i18n-method = - | ||
|i18n-desc = | |i18n-desc = | ||
|i18n-mediawiki-msg = | |i18n-mediawiki-msg = | ||
|i18n-subpage = | |i18n-subpage = | ||
|seealso = | |seealso = | ||
|setscats = | |setscats = | ||
|print = multi | |print = multi | ||
|shorthand = | |shorthand = | ||
|relieson = | |relieson = | ||
|mustbesubst = | |mustbesubst = | ||
|useTemplateData = 1 | |useTemplateData = 1 | ||
}} | }} | ||
==Examples== | == Examples == | ||
{{mbox | {{mbox | ||
|text=warning | |text=warning – for speedy deletion and other serious notices | ||
|type=warning | |type=warning | ||
}} | }} | ||
{{mbox | {{mbox | ||
|text=serious | |text=serious – for deletion notices | ||
|type=serious | |type=serious | ||
}} | }} | ||
{{mbox | {{mbox | ||
|text=issue | |text=issue – for larger issues | ||
|type=issue | |type=issue | ||
}} | }} | ||
{{mbox | {{mbox | ||
|text=query | |text=query – for minor issues | ||
|type=query | |type=query | ||
}} | }} | ||
{{mbox | {{mbox | ||
|text=style | |text=style – for cleanup (only difference is different icon) | ||
|type=style | |type=style | ||
}} | }} | ||
{{mbox | {{mbox | ||
|text=license – for licenses (please note, the icon is an example, templates will still use their current icons where applicable) | |||
|text=license | |||
|type=license | |type=license | ||
}} | }} | ||
{{mbox | {{mbox | ||
|text=legal | |text=legal – for legal disclaimers such as {{tl|Trademark}} | ||
|type=legal | |type=legal | ||
}} | }} | ||
{{mbox | {{mbox | ||
|text=protection | |text=protection – for protection notices | ||
|type=protection | |type=protection | ||
}} | }} | ||
{{mbox | {{mbox | ||
|text=honor | |text=honor – for honors such as featured image | ||
|type=honor | |type=honor | ||
}} | }} | ||
{{mbox | {{mbox | ||
|text=growth | |text=growth – for other "good" notices | ||
|type=growth | |type=growth | ||
}} | }} | ||
{{mbox | {{mbox | ||
|text=move | |text=move – for move requests | ||
|type=move | |type=move | ||
}} | |||
{{mbox | |||
|text=message | |||
|type=message | |||
}} | |||
{{mbox | |||
|text=notice (default) | |||
|type= | |||
}} | }} | ||
Revision as of 22:36, 22 January 2015
This is used to create message boxes.
Usage
{{Mbox
|text =
|type =
|image =
|imageright =
|textstyle =
|style =
}}
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
text | The text to be displayed. | empty | optional | |
type | Changes the color depending on the message needed. Each has its own preset image. | notice | optional | |
image | Override the image ("none" for no image). | depend on style | optional | |
imageright | Show an image on the right side. | empty | optional | |
textstyle | Override default style of text (e.g. centering - "align:left" / "align:right" / "align:center"). | empty | optional | |
style | Override in custom style overrides for the template using CSS. | empty | optional | |
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. | empty | optional | |
|
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
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 Newly created template documentation and imports Wikipedia's help about TemplateData • Commons-specific information This is used to create message boxes.
| ||||||||||||||||||||||||||||||||||||||||
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.