Template:BoxContent

From Nonkiki Wiki
Revision as of 14:41, 15 March 2014 by NTB (talk | contribs) (Docs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
You are viewing the documentation for Template:BoxContent, which has been automatically transcluded from its documentation page. You may:
  • edit the template; or:
  • edit the documentation

The derived box drawing templates can be used with simple text content, or complex HTML or wiki markup. This template simplifies the generation of content for a Template:SideBox or Template:FullBox. For more details, see the documentation for those individual templates.

For technical reasons, this should not be used with Template:TextBox.

What it does

This template creates the content for a box. You may specify a left image, right image, heading and/or message through the supplied arguments.

Usage

{{BoxContent
 |imgl=<left image filename>
 |imgr=<right image filename>
 |heading=<heading>
 |message=<message>}}
 

All of the arguments are optional, including message.

imgl and imgr

These specify an image or images to be displayed on the left and/or right of the box, respectively. If either or both is missing, then there will be no image displayed on the corresponding side.

You can use any uploaded image for this - it will be resized accordingly. In particular, you can use any of the icon images uploaded for use with Template:Icon.

heading

This specifies a heading. This will be emphasized (typically using bold text) and centred in the box.

If this is missing, then no heading will be generated.

message

This specifies the body text. This will be left-justified (but shown to the right of a left image, if one is present).

If this is missing, then no message will be generated.

Use with derived templates

Note that this template generates output even if all four arguments are missing or blank; it is not therefore suitable if you are relying on the default derived template behaviour of suppressing output when the content is blank.

It is also unsuitable for use with Template:TextBox, though it can be used directly with Template:Box.

Example

In the following code, BoxContent (shown here in green) is used to generate the text argument to be passed to Template:WarnBox:

{{WarnBox|text={{BoxContent|imgl=Icon_warn.png|heading=Warning!
|message=This is a warning box produced using templates!}}}}

It produces this result:

File:Icon warn.png
Warning!
This is a warning box produced using templates!