Box Macro

The Box macro renders wiki content in a graphical box which can contain a title and an image.

Usage

{{box title="<title>" image="<image>" cssClass="<cssClass>" /}}

Parameters

NameOptionalAllowed valuesDescriptionDefault value
titleYesA string: raw text or "xwiki/2.0" syntaxThe title displayed in the message boxNone
imageYesA string representing an absolute URLThe image to display in the message boxNone
cssClassYesA stringThe CSS sheet to use for rendering the boxNone

Example

{{box title="Content" image="http://mywiki.com/xwiki/bin/download/ColorThemes/DefaultColorTheme/logo.png" cssClass="floatingBox"}}
* Overview
* What's New
{{/box}}

will display

BoxMacro.png

The custom CSS can be included in a StyleSheetExtension object attached to the page. For the above example the CSS rules for the ".floatingBox" class are:

.floatingBox img{
width: 50px;
}
.floatingBox{
width: 500px;
}

Related Pages

Search this space