Configuration Overview

The Spacetree plugin lets you create navigation trees across multiple spaces easily with options for customization.

The macro allows you to group the spaces in the navigation by specific space categories. It even enables you to display the users' favorite spaces to personalize the navigation tree.

Feature Highlights

  • Display page tree-like navigation across multiple spaces

  • Group the spaces by specific space categories

  • Personalize the navigation tree by displaying the users' favorite spaces in the navigation

  • Use the macro on wiki pages or in themes like the Default Theme or Documentation Theme to display navigation trees in the sidebar of the theme

Screenshot Walkthrough

 

 

 

 


Spacetree Macro

The Spacetree macro allows you to group spaces in the navigation tree by specific space categories. It even enables you to display the users favourite spaces for personalizing the navigation tree. You can also leave the space categories field blank to display a list of all spaces.

Even though space categories are lower case in Confluence, the Spacetree macro will display the categories as you specify them in the macro parameters. This means categories like Products or Support Documents are automatically matched to the lower case categories products or support-documents.

You can use the Spacetree macro on wiki pages or in themes like the Default Theme or Documentation Theme to display navigation trees in the sidebar of the theme.

Configuration Parameters

Parameter

Default

Description

Parameter

Default

Description

Space Categories

spaceCategories

None - list of all spaces will be displayed

A comma-separated list of space categories to select the spaces you want to display in the tree. The space categories are case-insensitive and displayed in the tree as you specify them in the list. Leave blank to list all spaces.

Use any one of the following options to specify the parent space from which the tree is to be displayed:

  • @favourite to display favorite spaces of the current user.

  • @self to display page tree of current space, if it's not already listed in the space tree.

  • @personal to display the page tree of the personal space, if not already listed in the space tree.

Include Archived Spaces
includeArchivedSpaces

false

Enable to include archived spaces.

Expand Children
expandChildren

false

Enable to automatically expand the child pages of the current page.

Start Depth
startDepth

0

Enter any number greater than 0 to set how many levels of children the tree should show for the current space when it opens for the first time.

Sort Order
sort

position

The order the spaces should be sorted by. Valid values are:

  • 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.

Sort Pages
sortPages

true

Choose whether sort order should also be applied to pages in tree. Disable if you just want to sort the spaces in the tree.

Reverse Order
reverse

false

Enable for reverse ordering.

Style
style

modern

Choose whether you want to display the tree using the modern style (arrow icons) or the classic style (plus/minus icons). Valid values are:

  • classic - classic style in use before Confluence 5 using plus/minus icons.

  • modern - modern style introduced in Confluence 5 using arrow icons.

@self Title
currentSpaceTitle

"Current Space"

Title to display for @self section in tree, when using @self keyword in space categories. Use @self as title to display the name of the current space.

@favourite Title
favouriteSpacesTitle

"Favorite Space"

Title to display for @favourite section in tree, when using @favourite keyword in space categories.

@personal Title

“Personal Space”

Title to display for @personal section in tree, when using @personal keyword in space categories.

Hide Default Pagetree
hidePagetree

true

Choose whether the default page tree should be hidden in the sidebar when the Spacetree macro is being used in the sidebar as well.


Theme Configuration

Default Theme

Follow the steps below to replace the default page tree in the left sidebar of the Default Theme with the Spacetree macro:

  1. In the Confluence administration under Look and Feel, click Themes.

  2. Make sure the Default Theme is set as the current theme.

  3. In the Confluence administration under Look and Feel click on Sidebar, header, and footer.

  4. Insert the Spacetree macro as wiki markup {spacetree} into the Sidebar text area and click Save.

Documentation Theme (deprecated)

Follow the steps below to replace the default page tree in the left sidebar of the Documentation Theme with the Spacetree macro:

  1. In the Confluence administration under Look and Feel, click Themes.

  2. Select the Documentation Theme and click Configure theme.

  3. Deselect the Page Tree option.

  4. Insert the Spacetree macro as wiki markup {spacetree} into the Navigation text area.

Examples

  • {spacetree} - to list all spaces with default options

  • {spacetree:expandChildren=true|style=classic} - to list all spaces with expandChildren enabled and classic look & feel

  • {spacetree:spaceCategories=Departments,Products} - to list all spaces of categories departments and products

  • {spacetree:spaceCategories=What's New,Help Desk} - to list all spaces of categories what's-new and help-desk

  • {spacetree:spaceCategories=Version 1.2.0,Version 1.2.1} - to list all spaces of categories version-1-2-0 and version-1-2-1

  • {spacetree:spaceCategories=@self,Products} - to display all spaces of category products, or the page tree of the current space at the top of the space tree, if the space is not already in the products category