Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Ambox: Difference between revisions

Template page
Undo revision 25082 by Policied (talk) we're not Wikipedia
m 1 revision imported
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{{!}} style="{{{style|}}}" class="metadata plainlinks ambox {{#switch:{{{type|}}}
<onlyinclude>{{#invoke:Message box|ambox}}</onlyinclude>
  | serious  = ambox-serious
{{Documentation}}
  | content  = ambox-content
<!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! -->
  | style    = ambox-style
  | merge    = ambox-merge
  | notice  = ambox-notice
  | #default = ambox-notice
}}"
{{!}}-
{{#ifeq:{{{image}}}|none
  | <!-- no image cell -->
  | <nowiki/>
{{!}} class="mbox-image" {{!}} {{#switch:{{{image|{{{type|}}}}}}
    | serious  = [[File:Stop hand nuvola.svg|40px]]
    | content  = [[File:Emblem-important.svg|40px]]
    | style    = [[File:Broom icon.svg|40px]]
    | merge    = [[File:Merge-split-transwiki default.svg]]
    | notice  = [[File:Info non-talk.png|40px]]
    | blank    = <!-- empty image cell -->
    | #default = {{{image|[[File:Info non-talk.png|40px]]}}}
  }}
}}
{{!}} style="{{{textstyle|}}}" {{!}} {{{text}}}
{{#if:{{{imageright|}}}| <nowiki/>
{{!}} class="mbox-imageright" {{!}} {{#switch:{{{imageright|{{{type|}}}}}}
    | serious  = [[File:Stop hand nuvola.svg|40px]]
    | content  = [[File:Emblem-important.svg|40px]]
    | style    = [[File:Broom icon.svg|40px]]
    | merge    = [[File:Merge-split-transwiki default.svg]]
    | notice  = [[File:Info non-talk.png|40px]]
    | blank    = <!-- empty image cell -->
    | #default = {{{imageright|}}}
  }}
}}
{{!}}-
{{!}}}<noinclude>{{Documentation}}</noinclude>

Latest revision as of 00:15, 17 January 2025

Template documentation

Usage

Displays a message box on an article.

Example

{{Ambox
| type  = serious
| text  = Serious message
| style = width:70%
| textstyle = color:blue;
}}

Parameters

type

The type affects the colour of the left border and the image that shows by default (though this can be customised).

image (optional)

Displays an image to the left of the message box. By default, the image that matches the type will be displayed. This parameter will accept either a predefined type (e.g. |image=merge) or a link to an image (e.g. |image=[[File:ImageNameHere.jpg|40px]]).

No image will be shown if |image=blank is specified.

text

The text of the message.

style

CSS code to be applied to the entire message box (e.g. width).

textstyle

CSS code to be applied only to the text.

imageright

The same as image, but displayed to the right and hidden by default. Also allows for predefined types or custom images. If this parameter is used, one may also want to use |image=blank to hide the default image on the left.

MediaWiki Appliance - Powered by TurnKey Linux