Confluence 4.0 : Pagetree Macro
This page last changed on Oct 16, 2010 by smaddox.
The Pagetree macro displays a dynamic, hierarchical list of pages starting from a specified parent (root) page. You can embed the page tree into your Confluence page, where 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 open the relevant page. The page's current position is highlighted in the page tree. Below we tell you how to add the Pagetree macro to your page.
On this page: Usage with the Macro BrowserTo insert the Pagetree macro into a page using the Macro Browser,
Once you've found the Pagetree macro and have added the required parameter values, click 'insert' to add it to your page. Usage with the Wiki Markup EditorInclude the following markup in your page: {pagetree} There are more examples below. Macro ParametersWhen 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.
ExamplesAll ParametersHere's an example using all the parameters: {pagetree:root=Page Name|sort=natural|excerpt=true|reverse=false|startDepth=3|expandCollapseAll=true|searchBox=true} Specifying the Parent Page by NameUse the following code 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.
The above example is a 'live' example. It uses the child pages of this page to form the page tree. Showing All Pages in the SpaceUse the following code to make the page tree show all pages in the space, including orphaned pages and the home page. {pagetree:root=@none} Setting the Current Page as the Parent Page
The above example is a 'live' example. It uses the child pages of this page to form the page tree. Showing Excerpts from Each PageUse the following code if you want your page tree to include excerpts from each page. The excerpts must be defined on each page by the Excerpt macro.
The above example is a 'live' example. It uses the child pages of this page to form the page tree. Allowing your Readers to Expand or Collapse All BranchesUse the following code if you want to show the 'expand all' and 'collapse all' links at the top of your page tree.
The above example is a 'live' example. It uses the child pages of this page to form the page tree. Including a Search BoxUse the following code if you want to include a search box at the top of your page tree.
The above example is a 'live' example. It uses the child pages of this page to form the page tree. Sorting the Pages in Reverse Natural OrderUse the following code if you want to show the pages in reverse natural order.
The above example is a 'live' example. It uses the child pages of this page to form the page tree. RELATED TOPICSPagetree Search Macro Take me back to the Confluence User's Guide. |
![]() |
Document generated by Confluence on Sep 19, 2011 02:35 |