Column Macro
This is a Velocity macro, which isn't bundled with any XWiki product by default.
Macro contributed by Thomas Eveilleau.
This macro can be downloaded.
Macro contributed by Thomas Eveilleau.
This macro can be downloaded.
Column Macro
Allow you to easily create columns in the content of a pageUsage
#column(number of columns, justify, border)
Parameters definition
| Name | Optional | Allowed values | Default value | Description |
|---|---|---|---|---|
| Number of columns | no | 2,3,4 | none | Number of columns you want to display |
| Justify | yes | true | none | "true" to justify the text |
| Border | yes | true | none | "true" to add borders (black, 1px, solid) |
Example
#column("2" "true" "false")
content of my first column
#endcolumn()
#column("2" "true" "false")
content of my second column
#endcolumn()Result
Installation
This a Velocity macro. Since it's not bundled by default you'll have to copy/paste the following code to use it:#macro(column $columns $justify $border)
#if($columns==2)
#set($width="48%")
#elseif($columns==3)
#set($width="32%")
#elseif($columns==4)
#set($width="23%")
#else
#set($width="23%")
#end
<div style="float:left;width:${width};padding:5px;#if($justify=="true")text-align:justify;#end #if($border=="true")border:1px solid black;#end">
#end
#macro(endcolumn)
</div>
#end