Improve the Confluence "pagetree" macro functionality

There are two little issues for the Confluence "pagetree" macro that a lot of people wants to get fixed. Styling the current active page and automatically expand the children.

Point 1 - Style the selected page element in the tree

The currently selected page in the pagetree will be shown with a bold font style. At the selected element in the DOM you will find a "style" attribute with the value "font-weigth: bold;".But to do some own styling you will need a css class or id to grap this element.

Point 2 - Expand the children of the selected page

Wouldn't it be nice to automatically expand the child pages of a selected page? By default there is no macro parameter to achieve this request.

To solve these points we need to add a little code snippet to our "Administration" -> "Custom HTML"-Section ("At beginning of the BODY"-part).

I successfully have tested this code in confluence 3.4.2, 3.5.2, 4.1 and 4.2.

Improve the Confluence "pagetree" macro functionality. Ccode in Confluence
Heinrich Ulbricht
11. Mai 2011 

Sie haben Fragen oder möchten sich von uns beraten lassen?

Gerne stehen wir für Ihre Fragen zur Verfügung. Nutzen Sie einfach unser Kontaktformular.