Template:Cdx-message/doc
| This is a documentation subpage for Template:Cdx-message. It may contain usage information, categories and other content that is not part of the original template page. |
Lua error in Module:TNT at line 159: Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Uses TemplateStyles.tab.
| This template is rated as ready for general use. It has reached a mature state, is considered relatively stable and bug-free, and may be used wherever appropriate. It can be mentioned on help pages and other Wikipedia resources as an option for new users. To minimise server load and avoid disruptive output, improvements should be developed through sandbox testing rather than repeated trial-and-error editing. |
Displays a smaller and more compact notice as compared to the {{mbox}} series. Good for tips or notes in documentation and help pages. Not for article namespace. It looks similar to the Codex cdxMessage component, as it was originally styled to resemble it before that component became available in MediaWiki. Imported from mw:Template:Note.
Usage
[edit source]Types
[edit source]Standard
[edit source]Standard type that appears identical to the Codex style guide cdxMessage component:
Additional
[edit source]In order of visual severity, all set with |mbox=true like mbox templates:
Auto width
[edit source]Inline use
[edit source]Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Float right
[edit source]Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Multi-line
[edit source]Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Parameters
[edit source]Adds message template. To inform the user of something noteworthy or give the user feedback.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Content | 1 text content 1 | Contents of notice. | Content | required |
| Inline | inline | 'True' will set inline instead of a block.
| Boolean | suggested |
| content | content | no description | Unknown | optional |
| text | text | no description | Unknown | optional |
| Mbox appearance | mbox message box infobox | Appears like an Mbox/message box. Centered, 10% left and right margins.
| Boolean | suggested |
| Type | 2 type | Type of notice or style to show; i.e. border/background coloring and icon. May be null to show the pin.
| String | suggested |
| type | type | no description | Unknown | optional |
| Float right | right float | Set to float right with a restricted width of 238px.
| Boolean | suggested |
| Width | width | To set width to auto, then set auto.
| String | suggested |
| Class | class | Custom classes
| String | optional |
| Style | style | Custom CSS styling
| Content | optional |
| float | float | no description | Unknown | optional |
| infobox | infobox | no description | Unknown | optional |
| message box | message box | no description | Unknown | optional |
See also
[edit source]- {{mbox}}, and in particular the namespace-agnostic {{ombox}}, which by default resembles a typical "info" template.
- {{notice}}
- Codex
- To-do
- Could we change icon color with CSS filter function? Or should I reimplement entire thing following div and span tags used by new cdxMessage. And then copy their CSS for ease of use actually.