Container Macro
Lays out wiki content |
Type | JAR |
Category | |
Developed by | Unknown |
Rating | |
License | GNU Lesser General Public License 2.1 |
Table of contents
Description
For now, the only implemented decoration is the layout, and in particular the columns layout.
Usage
Use the container macro to define the layout and put the content to be layouted inside the container macro. For example, to layout content in columns, add a wiki group for each column inside the container macro, as in this example (for 2 columns).
(((first column)))
(((second column)))
{{/container}}
Note that inside the column groups you can add any wiki content. For example, the following result can be achieved (a 2 columns layout, with wiki content in the columns):
Parameter definition
Name | Optional | Allowed values | Default value | Description |
---|---|---|---|---|
layoutStyle | yes | any string, only 'columns' is implemented by default, for time being | none | The layout to use for the content grouped by the container macro. If missing or a non-implemented value is passed, no layout is applied, the content of the container macro is just rendered as if the macro was not there. |
justify | yes | boolean (true/false) | false | Whether the content in the container is justified or not (for the columns layout, it specify if the columns are be justified or not). |
For developers
You can easily implement your own layout style to be used with the container macro, by implementing the LayoutManager interface as a component, and dropping your implementation in the classpath (WEB-INF/lib of your wiki installation). The hint of your component will be the name of the layout style to pass to the container macro.
For example:
public class GridLayoutManager implements LayoutManager
{
...
}
which can then be used in a wiki page by writing:
your defined wiki content for the grid layout goes here
{{/container}}