Monday, 13 July 2009

Adding a Left Hand Navigation Tree to Confluence

To add a laft navigation tree to a confluence space:

  • Add a new page a the root of the space called TreeNavigation with the contents as follows.



  • {pagetree:sort=natural|excerpt=false|reverse=false|startDepth=1|expandCollapseAll=true|searchBox=false}


  • In Space Admin -> Look and Feel -> Layout , create a custom page layout


  • Replace:

    <div class="wiki-content">
    $body
    </div>

    With:

    #if ($action.isPrintableVersion() == false)
    <style>
    .spacetree * ul{
    padding-left:0px;
    margin-left: 0px;
    }
    .spacetree * li{
    margin-left: 5px;
    padding-left:5px;
    }


    </style>

    <table cellspacing="2" cellpadding="5">
    <tr>
    <td valign="top" align="left" width="22%" bgcolor="#F9F9F9" class="noprint treenav">
    <div class="tabletitle">Table of Contents</div>
    <div class="spacetree">
    #includePage($helper.spaceKey "TreeNavigation")
    </div>
    </td>
    <td valign="top" align="left" width="78%" class="pagecontent">
    <div class="wiki-content">
    $body
    </div>
    </td>
    </tr>
    </table>
    #else
    <div class="wiki-content">
    $body
    </div>
    #end

    1 comment:

    1. Enjoyed reading

      the report - most informative thanks

      ReplyDelete