This server will be upgraded at 3pm Sydney time on December 3rd (December 2nd, 8pm PST) and will be down for up to 30 minutes.

Confluence PageTree Plugin

Name AJAX PageTree
Vendor Atlassian
Authors Atlassian Developers, Ryan Talusan, Alain Moran, Matthew Jensen, Guy Fraser, Zohar Melamed
Homepage http://confluence.atlassian.com/display/CONFEXT/Confluence+PageTree+Plugin
Issue Management http://developer.atlassian.com/jira/secure/BrowseProject.jspa?id=10017
Continuous Integration n/a
Categories Content Macros
Most Recent Version 1.10.1
Availability Confluence v2.8.0 to v2.10
State Stable
Support Atlassian Supported Plugins
License Freeware / Open Source (BSD)
Price Free
Release Docs http://confluence.atlassian.com/display/CONFEXT/Confluence+PageTree+Plugin
Java API Docs n/a
Download Source http://svn.atlassian.com/fisheye/browse/public/contrib/confluence/pagetree-plugin/tags/pagetree-1.10.1
Download JAR pagetree-1.10.1.jar
You will need to use version 1.5 or earlier if you are using Confluence 2.7 (or earlier).

Confluence User Guide

For information on the Page Tree and Page Tree Search macros bundled with Confluence, please refer to the Confluence User Guide:€

Description

A macro that embeds the ajax page tree found in the browse space content page by william jones and zohar melamed, with extensions by adaptavist.com

Usage

{pagetree:root=PageName|sort=natural|excerpt=true|reverse=false|startDepth=3|expandCollapseAll=true|searchBox=true}

root defines the page which acts as the root of the tree. It can be the page name, or any of the following

  • @home - set the root page to the Home page (default)
  • @self - set the root to the current page
  • @parent - set the root to the parent of the current page
  • @none - pagetree shows all pages in the space, including Orphaned pages

sort may be one of the following

  • position - sort pages using the Confluence 2.8 sorting rules which uses the position if set, otherwise reverts to natural ordering (default for versions 1.7 onwards).
  • natural - sort pages in natural order, eg: title1, title2, title10 (default for versions before 1.7).
  • bitwise - sort pages using standard alphabetical sorting on the page title, eg:title1, title10, title2
  • creation - sort pages by creation date
  • modified - sort pages by modification date

excerpt is a true/false flag that states whether page excerpts should be included in the tree display (defaults to false)

reverse is a true/false flag that allows you to reverse the order of display (defaults to false)

searchBox is a true/false flag that allows you to add a search box that would allow searching within the page tree (defaults to false)

startDepth is any number greater than 0 that indicates how many levels of descendants to show initially. (defaults to 1)

expandCollapseAll is a true/false flag that allows you to add an expand all and collapse all feature (defaults to false)

If you just see a message "Loading..." and nothing else, make sure you have Base URL correctly set in your General Configuration settings.
Creating a navigation panel for your space

A popular usage of {pagetree} is to create a navigation panel showing a table of contents for your space. You can find the instructions in the Confluence User Guide.

Installation

Download the plugin jar (URL at top of this page) and upload via the Plugin Manager.

If you are upgrading from an earlier version, you will need to restart Confluence to clear the velocity cache in order to ensure the latest features are used.
This plugin now accessible through the Confluence Repository Client.

Plugin Versions

Version Date State License Price
Show description 1.0 (#1) 27 Dec 2005 Stable Freeware / Open Source (BSD) Free

Release Notes
The inital release.

Contributors

  • Zohar Melamed — Developer

Show description 1.2 (#3) 28 Feb 2006 Stable Freeware / Open Source (BSD) Free

Release Notes
Added some enhancements:

  • Ability to display excerpts
  • Ability to have more than one instance on a page
  • Natural Sorting by default (1, 2, ... 10 etc)
  • Ability to sort by natural, bitwise, creation, modified
  • Ability to reverse sort
  • Ability to display excerpts next to items in the tree

Contributors

Show description 1.2.1 (#4) 28 Feb 2006 Stable Freeware / Open Source (BSD) Free

Release Notes
Fixed sort-order selection issue

Contributors

Show description 1.2.2 (#5) 28 Feb 2006 Stable Freeware / Open Source (BSD) Free

Release Notes
Fixed PGTR-1, added scriptaculous effects and resolved issues with rendering wiki text in excerpts.

Contributors

Show description 1.2.3 (#6) 02 Mar 2006 Stable Freeware / Open Source (BSD) Free

Release Notes
Fixed PGTR-2, and resolved issues with rendering links in excerpts

Contributors

Show description 1.2.4 (#7) 24 Mar 2006 Stable Freeware / Open Source (BSD) Free

Release Notes
Fixed pagetree for confluence installs with a base path, fixed JS error in branch-collapse routine which caused a page refresh.

Contributors

Show description 1.2.5 (#8) 01 Apr 2006 Stable Freeware / Open Source (BSD) Free

Release Notes
Fixed issues with pagetree running within page.vmd on confluence 2.1.1

Contributors

Show description 1.2.6 (#9) 04 May 2006 Stable Freeware / Open Source (BSD) Free

Release Notes

  • Removed the requirement for the domain name to be set in general configuration
  • Added defaulting the root page to the homepage of the current space
  • Added the ability to use the @parent and @self macro pagenames
  • Contributors

    Show description 1.2.7 (#10) 05 May 2006 Stable Freeware / Open Source (BSD) Free

    Release Notes
    Resolve NPE's caused by pagetree being used in the left-nav theme (does NOT resolve CSS styling issues)

    Contributors

    Show description 1.3 (#11) 14 Jul 2006 Stable Freeware / Open Source (BSD) Free

    Release Notes
    Now extends BaseMacro to avoid breaking external image rendering

    Contributors

    Show description 1.6 (#13) 04 Feb 2008 Stable Freeware / Open Source (BSD) Free

    Release Notes

    • PGTR-12: Properly configured with maven 2 pom
    • PGTR-13: Fixed up some issues caused by PGTR-12 fix
    • CONF-10609: Updated action to use 2.8 compatible API.

    Contributors

    Show description 1.7 (#14) 27 Mar 2008 Stable Freeware / Open Source (BSD) Free

    Release Notes

    • CONF-11135: Updated sorting to use confluence's new natrual sorting to match this plugin

    Contributors

    Show description 1.8 (#15) 08 Jul 2008 Stable Freeware / Open Source (BSD) Free

    Release Notes
    1.8 release notes

    Contributors

    Show description 1.9 (#16) 21 Jul 2008 Stable Freeware / Open Source (BSD) Free

    Release Notes
    1.9 release notes

    Contributors

    Show description 1.10 (#17) 22 Aug 2008 Stable Freeware / Open Source (BSD) Free

    Release Notes
    1.10 release notes

    Contributors

    Show description 1.10.1 (#18) 22 Sep 2008 Stable Freeware / Open Source (BSD) Free

    Release Notes
    1.10.1 release notes

    Contributors

    • Atlassian Developers — Developer

    Outstanding issues

    Labels

    plugin plugin Delete
    macro macro Delete
    confluence20 confluence20 Delete
    confluence21 confluence21 Delete
    repository_current repository_current Delete
    Enter labels to add to this page:
    Please wait 
    Looking for a label? Just start typing.
    1. Jan 05, 2006

      Anselm McClain says:

      Thanks for the plugin - it's helpful. It would be great if there were a way to ...

      Thanks for the plugin - it's helpful.

      It would be great if there were a way to have the menu expanded by default to x levels. As it is now, I need to click down to the page I wish to visit, then click the page itself. If the top levels were expanded it would save a click.

      Also - it doesn't seem to have any memory of how I've left the various trees. It would be nice if things would stay expanded / collapsed while I'm browsing through the site.

      Best of luck!

      1. Mar 08, 2006

        Bernard Durfee says:

        Same here, this would be a nice feature.

        Same here, this would be a nice feature.

        1. Mar 08, 2006

          Guy Fraser says:

          Which bit - the default expansion or the memory of what's been expanded?

          Which bit - the default expansion or the memory of what's been expanded?

    2. Jan 06, 2006

      James Matheson says:

      I am working with the 'left navigation' theme and I want to put the PageTree plu...

      I am working with the 'left navigation' theme and I want to put the PageTree plug in into the Navigation page.   
      I can get the PageTree macro working in the main page, but when I put it in the Navigation page, I get a NullPointerException (output in the Navigation area).   The Navigation page looks correct when I view it, it only has a problem when it is rendered as the side bar. 

      Has anyone had any success this plugin in the Navigation page?

      1. Apr 19, 2006

        Othman Alaoui says:

        No success here so far (see my comments below).

        No success here so far (see my comments below).

    3. Feb 15, 2006

      Mingyi Liu says:

      Excellent macro! I like it a lot. I made a slight modification so that users can...

      Excellent macro! I like it a lot. I made a slight modification so that users can hide the tree if they want to (and change 'display:inline' to 'display:none' if you want the tree menu to be hidden by default):

      #if ($action.isPrintableVersion() == false)
      <style>
      .spacetree * ul{
      padding-left:0px;
      margin-left: 0px;
      }
      .spacetree * li{
      margin-left: 5px;
      padding-left:5px;
      }
      </style>
      
      <script>
        function toggleNavTree()
        {
          var td = document.getElementById('treenavtd');
          if(td.style.display == 'none') td.style.display = 'inline';
          else td.style.display = 'none';
        }
      </script>
      
      <table>
      <tr><a href="javascript:toggleNavTree()">Toggle Space Navigation Tree</a></tr>
      <tr>
      <td id="treenavtd" style="display:inline;" valign="top" align="left" width="22%" >
      <div class="tabletitle">Space Map</div>
      <div class="spacetree">
      #includePage($helper.spaceKey "TreeNavigation")
      </div>
      </td>
      <td valign="top" align="left" width="78%">
      <div class="wiki-content">
      <blockquote>
      $body
      </blockquote>
      </div>
      </td>
      </tr>
      </table>
      #else
      <div class="wiki-content">
          $body
      </div>
      #end
      

      An important question is: Most of our pages in a space is not branced off "Home", but I would like the tree to include all pages in a space, is it possible to modify the macro to allow setting root to space name so that all pages of a space would display? Thanks!

    4. Feb 27, 2006

      Jonty Hurwitz says:

      Hi Zohar I'm coming into your 'little family owned bank' on Thursday - to discu...

      Hi Zohar

      I'm coming into your 'little family owned bank' on Thursday - to discuss our fund factsheet reporting technology.  Our new product version links directly in with Confluence.  Thought it might be nice for you and I to hook up.  I can't seem to get your email anywhere so I hope you're watching this page.  Give me a shout:  jonty.hurwitz@statpro.com

    5. Mar 02, 2006

      Guy Fraser says:

      Zohar & William - would it be possible to change the license of this plugin ...

      Zohar & William - would it be possible to change the license of this plugin to BSD (ie. a certified open source license)?

    6. Mar 03, 2006

      samuel halle says:

      If you dont want to create a page only for the tree navigation, you can put the ...

      If you dont want to create a page only for the tree navigation, you can put the macro directly in the page layout, just replace a line of the code of Mingyi Liu from

          #includePage($helper.spaceKey "TreeNavigation")
      

      to

      $helper.renderConfluenceMacro("{pagetree:root=$space.homePage.title|sort=natural|excerpt=true|reverse=false}")
      
      1. Mar 03, 2006

        Alain Moran says:

        You should already be able to simply insert a pagetree macro into any page ... t...

        You should already be able to simply insert a pagetree macro into any page ... there is no reason that it should go onto its own page, I think thats just one way of using it.

        Possibly the idea of creating it in its own page was a workaround for the fact that it didnt use to work correctly with server trees on a single page. That issue is now resolved though so you shouldnt have any problems using it like a standard macro (thats the way that we and our clients use it)

        1. Mar 03, 2006

          Guy Fraser says:

          Samiel is referring to a technique to embed the page tree in to a theme. The lef...

          Samiel is referring to a technique to embed the page tree in to a theme. The left nav theme has a "navigation page" which allows you to add your own content to the left nav bar and the conventional way of adding the page tree was to put it on that navigation page. However, with the modification shown above, you can remove the navigation page completely and embed the page tree directly in to the left nav theme.

    7. Mar 16, 2006

      Rune Stilling says:

      Hi - I get the same exception. Did you find a solution?

      Hi - I get the same exception. Did you find a solution?

      1. Jun 21, 2006

        John Russell says:

        Hi - after working for several weeks, we are also seeing this error.  No re...

        Hi - after working for several weeks, we are also seeing this error.  No resolution at this time. 

    8. Mar 27, 2006

      Troy McKinnon says:

      I used the plugin repository to update my PageTree plugin. Now all my pages are ...

      I used the plugin repository to update my PageTree plugin. Now all my pages are saying:

      "The page you were trying to reach does not exist. You may want to try a search, or browse the site to find the page you were looking for."

      I use the layout mod with the following:

      $helper.renderConfluenceMacro("{pagetree:root=$space.homePage.title|sort=natural|excerpt=true|reverse=false}")

      1. Mar 27, 2006

        Guy Fraser says:

        I'll get Alain to check this out tomorrow. Have you tried it without the sort/ex...

        I'll get Alain to check this ou