Page Tree Search Macro

Using the Page Tree Search macro, you can add a search box to your Confluence page. When a viewer enters a search term, Confluence will search a hierarchy of pages starting from a specified parent (root) page and return the search results.

You can also add a search box as part of a dynamic page tree, which looks like a table of contents. See the Page Tree macro  .

Using the Page Tree Search macro

To add the Page Tree Search macro to a page:

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

Speeding up macro entry with autocomplete: Type { and the beginning of the macro name, to see a list of suggested macros. Details are in Autocomplete for links, files, macros and mentions.

To edit an existing macro: Click the macro placeholder and choose Edit. A macro dialog window will open, where you can edit the parameters of the macro.


Parameters are options that you can set to control the content or format of the macro output. Where the parameter name used in Confluence storage format or wikimarkup is different to the label used in the macro browser, it will be listed below in brackets (example).




Name of Root Page


The name of the root page whose hierarchy of pages will be searched by this macro. If this not specified, the root page is the current page.

Note: Unlike the Page Tree macro, the Page Tree Search macro does not accept the special values that start with an @ sign, such as @home or @self.

Code examples

The following examples are provided for advanced users who want to inspect or edit the underlying markup for a Confluence page. 

Macro name: pagetreesearch

Macro body: None.

Storage format example

Wikimarkup example

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

3 Archived comments

  1. User avatar

    Doug Swartz

    This macro appears to only search the contents of the pages in the Page Tree and not the comments of the pages in the page tree,

    Is this by design? Is there an alternative way to search a Page Tree, including the Comments in the search?

    Thank You.


    16 Oct 2013
  2. User avatar

    Erica Richardson

    I have the same problem. The macro searches pages and attachments, but not comments,

    21 Nov 2013
  3. User avatar

    Adam Fernie

    It would be really nice to see this page tree search autocomplete the same as livesearch.

    25 Apr 2014
Powered by Confluence and Scroll Viewport