Template:BoxContent: Difference between revisions
m Docs |
m 1 revision imported: All the templates from Cuntel Wiki |
(No difference)
| |
Latest revision as of 05:55, 23 January 2019
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: