Page Tree Macro
Screenshot: The Page Tree macro in Confluence showing two levels of hierarchy.
Add this macro to your page
To add the Page Tree macro to a page:
- Unable to render {include} The included page could not be found.
- Choose Page Tree from the Confluence content category.
- Choose the number of page versions to display.
- Choose Insert.
You can then publish your page to see the macro in action.
Screenshot: Configuring the Page Tree macro to display all pages below a specific page, in another space.
Change the macro parameters
Here's a list of the parameters available in this macro.
Parameter | Default | Description |
---|---|---|
Root Page | The home page of the space | Specify the parent page for the page tree. The tree will include all children of the given page, plus their children and grand-children etc. The tree will not include the root page itself.
|
Restrict to this space key | Current space | Enter a space name to show the page tree for a different space. Leave blank to use the current space. Set this parameter before the Root Page if you intend to specify a root page in another space. |
Sort Pages By | position | Specify the order to display the pages in the tree. This sort order is for display purposes only. It does not permanently re-arrange the page order. The value may be one of the following:
|
Include Excerpts in Page Tree | false | Select if you want the page tree to show excerpts from each page. The excerpts must be defined on each page by the Excerpt macro. |
Reverse Order | false | Select to show the pages in reverse (descending) natural order. Must be used in combination with the Sort Pages By parameter. |
Include Search Box above Page Tree | false | Select if you want to include a search box above the page tree. The search box allows your readers to search within the page tree for the specified value. |
Show Expand/Collapse Links | false | Select if you want to display the 'expand all' and 'collapse all' links at the top of your page tree. Your readers can click these links to open or close all branches of the tree at once. Available values in wikimarkup and storage format:
|
Start Depth | 1 | Enter any number greater than 0 to set how many levels of children the tree should show when it opens for the first time. |
Other ways to add this macro
Add this macro as you type
Add this macro using wiki markup
Macro name: pagetree
Macro body: None.
{pagetree:root=Page Name|sort=natural|excerpt=true|reverse=false|startDepth=3|expandCollapseAll=true|searchBox=true}