Template:Label

From MozillaWiki
Jump to: navigation, search
Documentation icon Template documentation[view] [edit] [history] [purge]

Usage

{{label}} creates an information box with a custom text, and is the basic alert template. The box will show at the position on the page where you put the template, and stretch horizontally to fill the width of the available space and vertically depending on how many rows of text are needed. The text inside the box is centred.

To use the template, type {{label|label=header|description=message body|icon=icon.png}}.

Parameters

There are three named parameters for the header (label), the message body (description) and an icon (icon), respectively. The label parameter is mandatory, while the other two are optional. The text inside the box is pre-formatted to align as centred, but can be additionally formatted using wiki-code.

Header

(Mandatory!) label: Custom text

The first parameter is the header, and is automatically formatted as bold text. Thus, any text you enclose in three apostrophes (for bold text) in this field will be inverted (i.e. show as plain text).

Usage:

  • {{label|label=header|description=message body|icon=icon.png}}

Body text

(Optional) description: Custom text

The second parameter is the message's body text, and is not pre-formatted.

Usage:

  • {{label|label=header|description=message body|icon=icon.png}}

Icon

(Optional) icon: File-name for icon (image)

The third parameter is for displaying an icon. The image is pre-formatted to appear on the left side of the box, but it isn't scaled up or down from its original size. Thus, only use appropriately small, icon-like images with this parameter.

You have to link to an image in the MozillaWiki file archive. Don't include the namespace, File:. Just enter the file-name including the file extension, e.g. image.png.

Usage:

  • {{label|label=header|description=message body|icon=icon.png}}

Examples

Correct use

Example case What you write What you see
Only header {{label|label=The "label" parameter is automatically formatted as bold text.}}
Header and body text {{label|label=This is the header|description=This is the body text.}}
Header, body text and icon {{label|label=This is the header|description=This is the body text.|icon=idea.png}}
Wiki-coding
{{label
|label=Wiki-formatting for '''bold text''' is inverted in the header
|description=The ''other rows'' '''behave as''' '''''normal'''''. <br />
You can use wiki-code to, e.g.
[[link to stuff]],
* list things,
make text <small>small</small> or <big>big</big>,
 and include pre-format boxes.
You can even



insert empty rows.
|icon=idea.png}}

Incorrect use

Example case What you write What you see
No parameters {{label}}
No "label" parameter {{label|description=This is the body text.|icon=idea.png}}
Empty "label" parameter {{label|label=|description=This is the body text.|icon=idea.png}}

See also