"tree" Macro
Last modified by Lucas Charpentier on 2026/11/12 15:15
Reference
Description
The tree macro displays a nested list as a tree whose nodes the reader opens and closes.
This page covers the trees written by hand in the macro content. The macro can also load its nodes on demand from a script: see the developer reference of the "tree" macro. To display the pages of the wiki, use the "documentTree" macro instead.
Usage
{{tree}}
* First node
** Child node
* Second node
{{/tree}}In the WYSIWYG editor the macro is listed as "Tree", in the Navigation category.
The macro is standalone only. Three behaviours are worth knowing before you use it:
- the tree is displayed closed, showing only the first level of the list;
- a node label can be a link, but it only looks and behaves as one when links is set to true;
- in the WYSIWYG editor, a tree without content displays a placeholder message until a list is written in it.
Parameters
| Name | Mandatory | Allowed Values | Default Value | Description |
|---|---|---|---|---|
| content | no | wiki syntax | none | A nested unordered list. Each item is a node, and the items nested under it are its children. |
| checkboxes | no | true, false | false | Whether to display a checkbox in front of each node, to let the reader select several nodes. |
| edges | no | true, false | true | Whether to display the lines connecting the nodes. |
| finder | no | true, false | false | Whether to display a search field above the tree. It suggests nodes as the reader types and opens the tree to the selected one. |
| icons | no | true, false | true | Whether to display an icon in front of each node. |
| links | no | true, false | false | Whether the node labels written as links look and behave as links. |
The other parameters of the macro concern the trees loaded from a script. They are described in the developer reference.
Examples
Display a List as a Tree
{{tree}}
* Fruits
** Apples
** Pears
* Vegetables
** Carrots
* Sandbox
{{/tree}}Here the reader has opened the Fruits node:

Use Links as Node Labels
{{tree links="true"}}
* [[Sandbox>>Sandbox.WebHome]]
** [[XWiki>>https://www.xwiki.org]]
{{/tree}}