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.

Use the Page Tree Search macro

To add the Page Tree Search macro:

  1. In the Confluence editor, select  > View more
  2. Find the item to be inserted and select it
  3. Select Insert

You can also type / onto the page to bring up the same list you'd see by selecting from the toolbar.

To edit the Page Tree Search macro:

  1. Select the macro placeholder. The floating toolbar appears.
  2. Select Edit. The right panel opens.
  3. Modify the parameters. Your changes are saved as you go.
  4. Resume editing the page, and the panel closes.

Parameters

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 browser, it will be listed below in brackets (example).

Parameter

Default

Description

Name of Root Page
(root

none

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.

Wiki markup example

Wiki markup is only supported in the legacy editor.


robotsnoindex
robotsnoindex

Wiki markup is useful when you need to add a macro outside the editor, for example as custom content in the sidebar, header or footer of a space.

Macro name: pagetreesearch

Macro body: None.

{pagetreesearch:root=My page name}