Search the Confluence 4.1.x Documentation:

Index
Downloads (PDF, HTML & XML formats)
Other versions

This documentation relates to Confluence 4.1.x
If you are using an earlier version, please view the previous versions of the Confluence documentation and select the relevant version.
Skip to end of metadata
Go to start of metadata

This page gives an example of how you might add an 'All Versions' section to your navigation side bar, as currently used in the Confluence documentation, Crowd documentation and the other Atlassian product documentation spaces.

If you are viewing this page online on the Atlassian documentation wiki, you will be able to see the 'All Versions' section at the top left of the navigation sidebar. Below is a screenshot.

A number of people have asked how we do it, so this page gives the answer. For details about creating the navigation side bar itself, please refer to Adding a Navigation Sidebar.

 

(warning) The information on this page does not apply to Confluence OnDemand.

Adding the Version Index to the Navigation Sidebar

This is how we added the 'All Versions' section to the sidebar:

  • For each product (Confluence, Crowd, Bamboo, etc) there is a page in the Inclusions Library of the ALLDOC space. The page lists all the versions of that product's documentation, linking to the relevant spaces. For example, here is the page for Confluence and the page for Crowd.
    (info)We put the 'all versions' page in ALLDOC because the page is used in a number of different spaces, via the {include} macro. For example, the 'all versions' page may be included:
    • In every documentation space (each version) for the product concerned, such as DOC, CONF29, CONF28, CROWD, CROWD013, CROWD012, etc.
    • In the Enterprise Hosting doc space.
    • As a panel on the documentation home page, as shown in the 'All Versions' panel of the above screenshot, as well as in the left-hand navigation bar.
    • Any other places where useful.
  • In each documentation space, there is a page called 'TreeNavigationVersions' like this one or this one, which copies in the content of the above 'all versions' page.
  • For each documentation space, the space's page layout now includes two pages instead of just one:
    • The 'TreeNavigation' page, as already described on the page above.
    • The new 'TreeNavigationVersions' page.

Here's the relevant section of our page layout as it is currently for the Confluence documentation (DOC) space:

Adding the Expand/Collapse Functionality to the Version Index

Another question we are asked is how we group the content of the included page under a collapsible control.

We use the Expand macro.  The details are on the Expand macro's documentation page.

Related Topics

Adding a Navigation Sidebar

  1. Nov 11, 2009

    Hi Sarah - thanks for this overview. I got it working in Confluence 3.0.1, although at first the expand macro wasn't working properly. The 'all versions' content was being added after the macro container, meaning that the 'all versions' information was always shown, no matter whether the collapsible control was clicked or not. This was fixed by changing the content 'span' tag to a 'div' tag in the last line of the expand macro (version 1.5):

    i.e. change:

    <span id="answer-$toggleId" style="display: none"><br>$!body</span>

    ... to:

    <div id="answer-$toggleId" style="display: none">$!body</div>

    That seems to work (although I haven't tested it in different view modes etc.)

    Anyway, there is another piece of magic that you use that I haven't worked out yet. How do you get the shared 'system' pages (e.g. _InclusionsLibrary, TreeNavigationVersions, ...) to *not* show up as children in the tree view, on the ALLDOC home page, etc.? I might be missing something obvious, but currently my 'TreeNavigationVersions' page displays itself proudly in the TreeNav, which you have obviously managed to avoid. Any hints much appreciated!

    Thanks,

    Alan 

  2. Nov 26, 2009

    P

    I'm very curious about that as well: how do you hide Spaces/Pages from the user while still being able to include (parts of) the pages in other pages that are visible to the user.

    I've tried this through security, but that didn't work.

    P.

    1. Nov 26, 2009

      P

      Figured it out: make the pages a sibbling of the Home page of the Space

      P.

  3. Feb 06, 2011

    Anonymous

    Hi Sarah,

    I have one main space  - Online Help and I need to show the page tree of a separate space - Knowledge Base - in the left panel.
    I am using the Documentation Theme.

    I couldn't follow the instructions above - what/where is an alldoc space or an inclusion library?

    Is there no easier way??

    Thanks very much in advance, Mumpy

  4. Feb 08, 2011

    Anonymous

    The PM did it for me - using the Page Layout in the Layout section - thanks Mumpy

  5. Apr 05, 2011

    r

    You guys are doing a great job!

    I added the left nav bar and also added the table of contents.

    Now my question is how to add spaces to this table of contents.

    Thanks!

  6. Aug 08, 2011

    The method here works if you disable themes and use the Global Look and Feel. If you're using the Documentation Theme, though, you can't edit the page layout directly (at least not through the Administration Console). You can only add Wiki markup to the Navigation panel under 'Configure theme', and if you do this, it doesn't render the 'expand' macro properly.

    You don't appear to actually use the 'expand' macro in your own sidebar any more – is that right? The current version of your documentation has a 'More...' link on the left, which looks hard coded. Is this page a bit out of date?

    Is there a way to get the 'expand' macro to work with the Documentation theme? I'm using Confluence v3.5.