Confluence 4.1 : Page Tree Macro

 

The Page Tree macro displays a dynamic, hierarchical list of pages starting from a specified parent (root) page. It can act as a table of contents or a list of related topics.

When viewing the page tree, your reader can click a link to view the relevant page. The page's current position is highlighted in the page tree.

Creating a navigation panel for your space

The Page Tree macro is used in the Confluence Documentation theme, to create a navigation panel showing a table of contents for your space. Read the instructions on Configuring the Documentation Theme.

Using the Page Tree Macro

To add the Page Tree macro to a page:

  1. In the Confluence editor, choose Insert > Other Macros.
  2. Find and select the required macro.

Click Refresh in the Macro Browser to see the effect of changes to the macro parameters.

Macro Parameters

When editing, you can click on the macro placeholder and choose Edit to display the parameters for this macro in the Macro Browser.

Parameters are options that you can set for Confluence macros to control the content or format of the macro output. The table below lists parameters for this macro that can be set in the Macro Browser.

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.

Specify the page title or a special value as follows:

  • Your page title — to specify a page name for the parent or root of the tree. The tree will include all children and grand-children of the specified root. The tree will not include the specified root page itself.
  • '@home' — will include all pages under the home page of the space (default).
  • '@self' — will include all pages under the current page.
  • '@parent' — will include all pages under the parent of the current page, including the current page.
  • '@none' — will include all pages in the space, including orphaned pages and the home page.

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:

  • bitwise — sort alphabetically, for example: title1, title10, title2.
  • creation — sort by date of creation.
  • modified — sort by order of date last modified.
  • natural — sort in 'natural' alphabetical order, for example: title1, title2, title10.
  • position — sort by the default Confluence sorting rules. If your pages have been ordered manually, this sort will respect the defined order. Otherwise the pages will be displayed in the 'natural' alphabetical order, such as: title1, title2, title10.

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.

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.

Related Topics

Page Tree Search Macro
Adding a Navigation Sidebar
Working with Macros

Take me back to the Confluence User's Guide.