MBox Macro
Draws styled boxes around wiki content |
Type | XAR |
Category | |
Developed by | |
Active Installs | 21 |
Rating | |
License | GNU Lesser General Public License 2.1 |
Table of contents
Description
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.
Macro Name
mbox
Parameters
- title (required)
- A title for the box.
- subTitle
- An optional subtitle.
- icon
- An 22x22 pixel icon to be displayed on top-left corner of the box. Icon reference should be of the form wiki:space.page@image.ext or icon:iconname. A default cog icon is used when none is provided.
- width
- Width of the box, can be any css length specification (75%, 100px, 3em, ...).
- color
- Background color of the box, can be any css color specification (red, #1A2B6E, ...).
Exemples
Code
{{mbox title="A Title" subTitle="An Optional **Sub-Title**"}} Any **xwiki** content. {{/mbox}} | {{mbox title="A Title" icon="Sandbox.WebHome@XWikiLogo.png" color="lightblue"}} Any **xwiki** content. {{/mbox}} |
Results
Documentation of initial version by Asiri Rathnayake
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
You can install the MBox macro by downloading the XAR bundle and importing it to your wiki with programming rights. Note that if you are running an XWiki farm, the installation needs to happen on the main wiki.
Usage
Any **xwiki** content.
{{/mbox}}
Parameters Definition
Name | Optional | Default Value | Description |
---|---|---|---|
title | No | None | Title of the box (to be displayed on top of the content) |
subTitle | Yes | None | An optional sub-title to further describe the content |
icon | Yes | xwiki:Macro.Box@mbox.png | A 22x22 pixel image to be displayed on top-left corner of the box (Eg. wiki:Page.Space@image.png) |
width | Yes | auto | Width of the box, can be any css width specification (Eg. 75%) |
color | Yes | #CCCC99 | Background color of the box, can be any css color specification (Eg. red) |
Example
Any **xwiki** content.
{{/mbox}}
Screenshot
Notes
Please refer to this blog post for more examples and information on customizing the MBox macro.
Prerequisites & Installation Instructions
We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.
You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:
- Log in the wiki with a user having Administration rights
- Go to the Administration page and select the Import category
- Follow the on-screen instructions to upload the downloaded XAR
- Click on the uploaded XAR and follow the instructions
- You'll also need to install all dependent Extensions that are not already installed in your wiki