MBox Macro

This is a XWiki macro, which isn't bundled with any XWiki product by default.
Macro contributed by Asiri Rathnayake.
This macro can be downloaded.

MBox Macro

This wiki macro allows drawing styled boxes around wiki content. Layout of these styled boxes are different from that of Box Macro generated boxes and the look and feel of these boxes can be centrally controlled by editing the associated style sheet extension attached to the wiki macro document. Also, Mbox macro can be easily extended to create new sub macros for convenience.

Installation

Warning: Wiki macros are only available for XE versions greater than 2.0M2

You can install the mbox macro by downloading the XAR bundle and importing it to your XWiki with programming rights. Note that if you are running an XWiki farm, the installation needs to happen on the main XWiki.

Usage

{{mbox title="A Title"}}
Any **xwiki** content.
{{/mbox}}

Parameters Definition

NameOptionalDefault ValueDescription
titleNoNoneTitle of the box (to be displayed on top of the content)
subTitleYesNoneAn optional sub-title to further describe the content
iconYesxwiki:Macro.Box@mbox.pngA 22x22 pixel image to be displayed on top-left corner of the box (Eg. wiki:Page.Space@image.png)
widthYesautoWidth of the box, can be any css width specification (Eg. 75%)
colorYes#CCCC99Background color of the box, can be any css color specification (Eg. red)

Example

{{mbox title="A Title" subTitle="An Optional **Sub-Title**" width="75%"}}
Any **xwiki** content.
{{/mbox}}

Result

mbox.png

Notes

Refer this blog post for more examples and information on customizing mbox macro.

Tags:
Created by Asiri Rathnayake on 2009/11/15 10:11
Last modified by Asiri Rathnayake on 2009/12/18 08:58

This wiki is licensed under a Creative Commons license
2.2.1.27354