Confluence pages can be set to include a left-hand navigation sidebar (table of contents). There are two ways of implementing this functionality in Confluence:
- Using the Documentation Theme — This theme provides the left-hand navigation sidebar that you see in this documentation. The documentation theme is a plugin which can be installed directly via the Administration Console. For more information on installing plugins in Confluence, please refer to Installing Plugins and Macros. The documentation theme plugin is also available for download from our plugins site.
- Using Custom Layouts — This is an alternative method (documented below) which is more complex to set up than the documentation theme and requires more maintenance with Confluence major release upgrades.
| Custom layout customisations must be re-applied each time you upgrade Confluence When you upgrade to a new major Confluence version (e.g. from Confluence 2.9.x to Confluence 2.10.x or from Confluence 3.0.x to Confluence 3.1.x), you will need to re-apply this custom layout customisation. See instructions below. |
Using Custom Layouts to Implement a Navigation Sidebar

You can see an online example of this theme in our older documentation archives (which can be reached from our Applications and Tools Documentation Directory). Compare this Documentation Theme to the navigation sidebar based on Custom Layouts in our Confluence 3.0 and earlier documentation archives, which can be accessed from the Confluence Documentation Directory.
Follow the instructions below to add the navigation sidebar to your Confluence space.
| Permissions required To customise a space layout as described below, you must be a Space Administrator in the given space and you must be a System Administrator on the Confluence site. |
Step 1. Create the TreeNavigation Page
First, you will create a Confluence page containing the pagetree macro. This is just a normal Confluence page. The only slight oddity is that it should reside at the root of your space, instead of under the space's home page.
Follow these instructions:
Go to the 'Space Pages' view for the current space. To do this:
- Go to a page in the space, open the 'Browse' menu and select 'Pages'. The 'Space Pages' view will open.
- At the root level of the space, create a page named 'TreeNavigation'.
- On the page, insert the following text:
{pagetree} - Now decide if you want to add extra functionality to your page tree. By default, using the code above, the page tree will use the home page of the space as its root. You can choose to:
- Specify a different root for your page tree.
- Add a search box at the top of the tree.
- Allow the viewers to expand and collapse the whole tree.
- Control other aspects of the display.
For more information, read about the Pagetree macro.
Step 2. Change the Page Layout on your Space
Now you will change the page layout on your space, to include the above page on the left of every web page displayed.
Go to the 'Space Admin' tab of the Browse Space view. To do this:
- Go to a page in the space, open the 'Browse' menu and select 'Space Admin'. The 'Space Administration' view will open.
'Space Admin' is only displayed if you are a space administrator for that space or you are a Confluence system administrator.
- Go to a page in the space, open the 'Browse' menu and select 'Space Admin'. The 'Space Administration' view will open.
- Make sure the Confluence Default theme is selected from the 'Themes' menu.
- Click 'Layout' under the 'Look and Feel' section.
'Layout' is only displayed if you are a Confluence Site Administrator.
- Click 'Create Custom' under the 'Page Layout' section.
- In the layout, locate the 'VIEW' section, and find this code:
<div class="wiki-content"> $body </div>
- Replace the above code block with this code:
#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"> <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 - If you want to, you can change the table title in the above code from 'Table of Contents' to something else. For example, it might say 'Confluence Documentation'.
- Save the updated layout.
Re-Applying the Customisation on Upgrade
When you upgrade to a new major Confluence version (e.g. from Confluence 2.9.x to Confluence 2.10.x or from Confluence 3.0.x to Confluence 3.1.x), you will need to re-apply this customisation.
Reason:
The new Confluence version may contain updates to the page layouts. Because you have customised the page layouts, Confluence will not overwrite your customisation. So your space will not get the latest updates until you set the layout to default and then re-apply your changes.
Here's how to do it:
- First make a copy of your customised code, if you have changed it from the code above:
- Go to 'Space Admin, click 'Layout' and edit the customised page layout (as created above).
- Copy the section of code that inserts the customised left-hand navigation panel.
- Close the page layout.
- Click 'Reset Default' next to 'Page Layout', to set the page layout back to default. This will bring in the new code for the upgraded version of Confluence.
- Create a custom page layout as described in step 2 above, and reinsert the custom left-hand navigation code.
- Save the updated layout.
| The 'All Versions' section in the navigation bar A number of people have asked how we created the 'All Versions' section at the top of our navigation side bar. Take a look at Adding an All Versions Section to your Navigation Bar. |
RELATED TOPICS
Customising Layouts
Upgrading Custom Layouts
Customising the Left Navigation Theme
Example Confluence Designs






Comments (75)
Dec 04, 2008
patrick dinneen says:
Will the sidebar always have the look and feel of the sample above (drill down f...Will the sidebar always have the look and feel of the sample above (drill down for children etc) or can I customize it ( have rollover links, tables, headers etc)
Thanks,
Patrick
Dec 09, 2008
Giles Gaskell [Atlassian Technical Writer] says:
Hi Patrick, Thanks for your query. It may be possible to customise the Navigati...Hi Patrick,
Thanks for your query. It may be possible to customise the Navigation Sidebar, for example, text colours and size. However, other features are not supported at this time.
Kind regards,
Giles Gaskell
Technical Writer
ggaskell@atlassian.com
ATLASSIAN - http://www.atlassian.com
Dec 16, 2008
Anonymous says:
Is it possible to have a test for existence for the TreeNavigation page added? I...Is it possible to have a test for existence for the TreeNavigation page added? I can't figure out how to do this. If we make this the standard for the site layout, any page missing the page gets an error message and allocates a blank section.
If TreeNavigation does not exist, simply drop down to showing $body.
It is not clear how to do this from the documentation.
Dec 19, 2008
Anonymous says:
I agree this would be a very good addition. In our case we use different spaces ...I agree this would be a very good addition. In our case we use different spaces for new versions of our user manuals. Every time we create a new version we copy the latest manual space to a new space but we have to re-apply the above procedure every time. If we could do what the comment above suggests there would be no action required next to the space copying.
Dec 19, 2008
Azwandi Mohd Aris [Atlassian] says:
Hi, The checking is actually done in the code, that is the reason you get the "...Hi,
The checking is actually done in the code, that is the reason you get the "Page Not Found" error in a red box. You can try see the code for velocimacro
which is defined in macros.vm that resides in <confluence-install>\confluence\template\includes directory. If you are comfortable with Velocity, you can try modify it to not display the "Page Not Found" error, at least.
Hope that helps,
Azwandi
Dec 23, 2008
Anonymous says:
While I love what i am seeing so far, I am stymied when I try to do the change y...While I love what i am seeing so far, I am stymied when I try to do the change you discuss here. When I get to Step 2.2, namely "Click 'Layout' under the 'Look and Feel' section", I get message:
"You can not customise the site look and feel while a theme is active. You must first disable currently configured theme"
How do I address this?
Dec 23, 2008
Azwandi Mohd Aris [Atlassian] says:
The custom layout feature is not supported in all themes. Amongst all of the bun...The custom layout feature is not supported in all themes. Amongst all of the bundled themes, only the Confluence Default Theme has this feature. You may need to switch your current theme to the Confluence Default Theme to see further options.
Feb 05, 2009
Anonymous says:
Nope that didn't do it - the message is still there...Nope that didn't do it - the message is still there...
Feb 06, 2009
Azwandi Mohd Aris [Atlassian] says:
Ensure that both global and space theme is set to Confluence Default Theme. Does...Ensure that both global and space theme is set to Confluence Default Theme. Does that help?
Feb 09, 2009
Anonymous says:
Nope. I changed all of the themes of all spaces to default and that didn't do it...Nope. I changed all of the themes of all spaces to default and that didn't do it either.
Feb 09, 2009
Anonymous says:
I have the same problem with the "You can not customise the site look and feel w...I have the same problem with the "You can not customise the site look and feel while a theme is active. You must first disable currently configured theme." error and I've set the global and space them to the default theme.
Aug 12
Anja Gruss says:
same here. all spaces are set to Default Theme, "You can not customise the site ...same here. all spaces are set to Default Theme, "You can not customise the site look and feel while a theme is active. You must first disable currently configured theme."
Are there any further options (Conf 3.0.0_01)
Aug 13
Zed Yap [Atlassian] says:
Hi Anja same here. all spaces are set to Default Theme, "You can not customise...Hi Anja
You might want to try to change the Global theme to default Theme and see if that helps. For more information on Global Theme, please refer to this documentation:
Hope that helps.
Best rgds,
Zed
Aug 13
Anja Gruss says:
problem was solved. Though both global as well as space themes showed they were ...problem was solved. Though both global as well as space themes showed they were set to default, it seems they were in truth linked to a no longer existant theme. In the end I set both global and space themes to Clickr, changed back to Default, disabled clickr (just to be sure) and then it worked.
Jan 12, 2009
Christian Bering says:
I've succesfully added a navigation tree using the instructions, but now the Tre...I've succesfully added a navigation tree using the instructions, but now the TreeNavigation page is visible as a page in the navigation tree itself. This doesn't seem to be the case on this page, which makes me think that there is a way to hide it?
Jan 12, 2009
Sarah Maddox [Atlassian Technical Writer] says:
Hallo Christian By default, the pagetree as described above will show all pages...Hallo Christian
By default, the pagetree as described above will show all pages which are under the space's "Home" page. It will not show pages which are at the root level of the space. Take a look at step 1.1 above, to see how to add your navigation page at the root level so that it does not show.
If your space hierarchy is different, you may need to create a top-level page and move all your pages underneath it, except for the ones which you don't want to show in the table of contents.
I hope that helps
Cheers — Sarah
Jan 13, 2009
Brian Carr says:
I am curious about how the "All Versions" section that appears above the "Conflu...I am curious about how the "All Versions" section that appears above the "Confluence 2.10 Documentation" pagetree in the sidebar. It appears that those links point to other spaces, but I'd like to know how to enable that sort of control in my space. It looks like another macro (similar to pagetree) that is being used. Any pointers there?
Jan 13, 2009
Sarah Maddox [Atlassian Technical Writer] says:
Hallo Brian A touch of magic For each product, there is a page in the Inclu...Hallo Brian
A touch of magic
Here's our page layout as it is currently for the DOC space:
#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="30%" bgcolor="#eeecec" class="noprint"> <div class="tabletitle">All Versions</div> <div class="spacetree"> #includePage($helper.spaceKey "TreeNavigationVersions") </div> <div class="tabletitle">Confluence 2.10 Documentation</div> <div class="spacetree"> #includePage($helper.spaceKey "TreeNavigation") </div> </td> <td valign="top" align="left" width="70%" class="pagecontent"> <div class="wiki-content"> $body </div> </td> </tr> </table> #else <div class="wiki-content"> $body </div> #endThis is a good question
so I've added a page in case other people would like to know the answer too: Adding an All Versions Section to your Navigation Bar.
Cheers — Sarah
Jan 14, 2009
Brian Carr says:
Sarah, Excellant! I was able to get that to work. One final question, and I...Sarah,
Excellant! I was able to get that to work. One final question, and I could probably find the answer on my own (if I wasn't so lazy). But in the TreeNavigationVersions that you link above, you are using something (in addition to the include macro) to group the content of the included page under a collapsable control or "twisty". I see that in use a lot in your various spaces. Any additional "magic" you can let me in on
Thanks!
Jan 14, 2009
Sarah Maddox [Atlassian Technical Writer] says:
Hallo Brian That's another good question We use the {expand} macro. It's a 'use...Hallo Brian
We use the {expand} macro. It's a 'user macro', which means that you can add it to your Confluence site by adding the code into the 'User Macros' section of your Confluence Administration Console. The details are on the Expand macro's documentation page. I'll add this information to my new page too.
That's another good question
Cheers — Sarah
Feb 06, 2009
Brian Carr says:
It's me again, and I have one more question. I really like using the {toc} macro...It's me again, and I have one more question. I really like using the {toc} macro as it displays the contents of the current page. My hope was to follow instructions similar to what you have listed above to add a link to a page which includes the {toc} macro so that in addition to allowing me to navigate the space, I could also navigate the contents of the current page.
So, I created a new page (at the root level) named "DocumentTOC" and it currently contains the following code:
{toc}And when I save that page, it pretty much shows nothing (which is what I would expect since the page "DocumentTOC" doesn't actually contain anything.
Next, I added a few lines of my own to the page layout (right above the DIV for the TreeNavigation page):
So, now I get the little section that shows "Document Contents" with the pretty line, but nothing shows up underneath. It makes sense, since the page that I link to doesn't really contain anything. The question is, is there something that I can add to the "DocumentTOC" page that will allow the contents of the current page to be rendered by the {toc} macro?
I tried doing something like this in "DocumentTOC":
{toc} !@self! {toc} or {toc} {include:@self} {toc}But that just resulted in errors (because it could find the page named "@self").
I am trying to get it to where I can always have a document toc included with every page, without having to actually add it to the page itself. Does this make sense? Am I crazy?
(please don't answer that)
Sep 02
Anonymous says:
I faced the same problem. But finally found a solution: Just use window.Synta...I faced the same problem. But finally found a solution:
Just use
$helper.renderConfluenceMacro("{toc}")instead of
That will render the Macro directly without that page DocumentTOC, which can be deleted of course.
Nov 10
Anonymous says:
Thank you for this tip. This is really cool. I have some really long...Thank you for this tip. This is really cool. I have some really long pages with docs, so having a table of contents on the left is quite helpful. Formatting kind of sucks right now, but at least it's there.
Mar 19, 2009
Pedro Martello says:
Thanks! this is a great customization to the page layout. We made a couple ...Thanks! this is a great customization to the page layout.
We made a couple of additional changes to it to allow the sidebar to be resizable via drag operations. It requires referencing two additional jquery modules - ui.mouse and ui.resizable. You may have to adjust the paths for those below, depending on the root of your confluence installation. [courtesy of http://www.kleineikenscheidt.de/stefan/archives/2008/12/confluence-resizable-navigation-tree.html]
We further modified the recipe on Stefan's site to incorporate two additional features:
1) we removed the dependency on the homeless NavigationTree page at the root of each space by forcing the velocity engine to render the confluence macro directly.This makes it easy to change the Global layout of the entire Confluence instance to include the sidebar since each space no longer needs to have that homeless page.
2) we implemented the cookie behavior Stefan proposes in his original article, though without using the jquery.cookie plugin. This makes the width of the sidebar persist for the duration of your session.
Here is our modification:
## begin: left-tree customization #if ($action.isPrintableVersion() == false) <script src="/includes/js/jquery/jquery.ui-1.5a/ui.mouse.js"></script> <script src="/includes/js/jquery/jquery.ui-1.5a/ui.resizable.js"></script> <style> .spacetree * ul{ padding-left:0px; margin-left: 0px; } .spacetree * li{ margin-left: 5px; margin-right: 5px; padding-left:5px; } div.spacetree { overflow: hidden; } .spacetree * li a { white-space:nowrap; } .spacetree * li { white-space:nowrap; } .ui-resizable-handle.ui-resizable-e { background-color: #DDDDDD !important; width: 2px !important; } div.resizable { overflow: hidden; min-height: 400px; } </style> <script> AJS.toInit(function () { var COOKIE_NAME = "sidebar_width"; var setNavHeight = function() { jQuery("div.resizable").height(jQuery("td.treenav")-10); setCookie(COOKIE_NAME , jQuery("div.resizable").width(), null, null, null, "/"); }; jQuery("div.resizable").resizable({ handles: "e", resize: setNavHeight }); var defaultWidth = parseInt(getCookie(COOKIE_NAME) ? getCookie(COOKIE_NAME) : 250); jQuery("div.resizable").width(defaultWidth); setNavHeight(); }); </script> <table cellspacing="2"> <tr> <td valign="top" align="left" bgcolor="#F9F9F9" class="noprint treenav"> <div class="resizable" style="padding: 5px;"> <div class="tabletitle">Table of Contents</div> <div class="spacetree"> $helper.renderConfluenceMacro("{pagetree: root=@home | sort=position | searchBox=false | startDepth=2 }") </div> </div> </td> <td valign="top" align="left" class="pagecontent" style="padding: 5px"> <div class="wiki-content"> $body </div> </td> </tr> </table> #else <div class="wiki-content"> $body </div> #end ## end: left-tree customizationMay 05, 2009
Jorge Miguel Correia says:
Thanks, it looks better and doesn´t need the homeless TreeNavigation PageThanks,
it looks better and doesn´t need the homeless TreeNavigation Page
Jun 15, 2009
Anonymous says:
Hello, thanks, this proposal works fine, but only in Opera and Firefox. In Int...Hello,
thanks, this proposal works fine, but only in Opera and Firefox.
In Internet Explorer (tested with 7 and 8, even in compatibility mode), when I change the width of the tree navigation bar, the width is increased. But the height is cropped so the tree is not completely visible. The vertical bar is shown at the old location. In case the width is reduced the vertical bar even disappears so it can never be increased again.
For the meantime, I added a simple browser check:
var browserName=navigator.appName; if (browserName!="Microsoft Internet Explorer"){ ... }Any ideas how to solve this problem?
Jun 24, 2009
Anonymous says:
Hi, This new pagetree works great but I have one question: How can I set a maxi...Hi,
This new pagetree works great but I have one question: How can I set a maximum width for both the normal resizable and the IE fixed one?
I found the following option for resizable:
$('.selector').resizable({ containment: 'parent' });but I'm not really a JS wizard. Where would I insert this and how so that it's used for the normal and the IE fix?
Thanks.
Jun 24, 2009
Anonymous says:
Ok, I've been trying some more and ive seemed to fix some of it using maxWidth. ...Ok, I've been trying some more and ive seemed to fix some of it using maxWidth.
AJS.toInit(function () { var browserName=navigator.appName; if (browserName!="Microsoft Internet Explorer"){ var COOKIE_NAME = "sidebar_width"; var setNavHeight = function() { jQuery("div.resizable").height(jQuery("td.treenav")-10); setCookie(COOKIE_NAME , jQuery("div.resizable").width(), null, null, null, "/"); }; jQuery("div.resizable").resizable({ handles: "e", maxWidth: 300, resize: setNavHeight }); var defaultWidth = parseInt(getCookie(COOKIE_NAME) ? getCookie(COOKIE_NAME) : 250); jQuery("div.resizable").width(defaultWidth); setNavHeight(); } });Only problem with this is that whenever I click the handle at maxwidth and move it a bit, the whole thing doesn't grow bigger but it gets a "left: 10px;" stacking everytime I do, making the whole div move over my page. Also this doesn't fix my maxwidth in IE yet, anyone that can help me with this?
Jul 24, 2009
Anonymous says:
I merged all the great codes proposed above for making a fixed with navigation s...I merged all the great codes proposed above for making a fixed with navigation sidebar. I prefer using pixels instead of percentage because i think it is better for the eye, when the side bar don't constantly change in size.
#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" style="min-width: 300px;max-width:300px;" bgcolor="#F9F9F9" class="noprint"> <div class="tabletitle">Table of Contents</div> <div class="spacetree"> $helper.renderConfluenceMacro("{pagetree: root=@home | sort=position | searchBox=false | startDepth=2 }") </div> </td> <td valign="top" align="left" class="pagecontent"> <div class="wiki-content"> $body </div> </td> </tr> </table> #else <div class="wiki-content"> $body </div> #endThx for all the great proposals!
Mar 16, 2009
Anonymous says:
Does the basic side bar navigation tree instructions above work for user spaces ...Does the basic side bar navigation tree instructions above work for user spaces ? they seem to behave differently...
Mar 18, 2009
Zed Yap [Atlassian] says:
Hi, As far as I know, the basic side bar navigation as mentioned above is appli...Hi,
As far as I know, the basic side bar navigation as mentioned above is applicable to user spaces. Perhaps, you might want to clarify more on this?
Hope that helps
Mar 23, 2009
Anonymous says:
When I click on the link on the navigation bar, it always opens a new page. How ...When I click on the link on the navigation bar, it always opens a new page. How to make the navigation bar stay on the left side of page, instead of opening a new page?
Mar 29, 2009
Azwandi Mohd Aris [Atlassian] says:
Unless there is some customisation effort to use HTML IFrame, AJAX interface or ...Unless there is some customisation effort to use HTML IFrame, AJAX interface or etc., this seems to be impossible. However, the Pagetree Macro should tell you where you are - it will expand the tree and highlight the position of the current page in the page tree.
Apr 20, 2009
Lars Sjögren says:
When applying this layout, it seems as if the width of the left navigation tree ...When applying this layout, it seems as if the width of the left navigation tree varies depending on what page I look. I try different values for the width of the <td> for the nav tree and the wiki content, but I see no difference in appearance. Any advice to what I have done wrong, or to what I can do differently?
Apr 22, 2009
Arie Murdianto says:
Hi, Please give a try to edit the table by adding attribute width. The HTML sho...Hi,
Please give a try to edit the table by adding attribute width. The HTML should be like as follow:
Cheers,
May 14, 2009
Anonymous says:
Hi, I am trying to add macro around the ...Hi,
I am trying to add
May 19, 2009
Arie Murdianto says:
Hi, I am not too sure on the first question, perhaps you can explain more detai...Hi,
I am not too sure on the first question, perhaps you can explain more detail. Regarding the second question, you can do that by inserting an if statement before copying the provided script on this page. Using $action object which is accessible via Confluence, you can get the user who is currently accessing your Confluence. You may want to see the following modified script:
#if($action.getRemoteUser().getName() == "armur") #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"> <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 #endJun 18, 2009
Rene Kermici says:
Hi, I have a similar problem with the navigation bar. My users wish to be able ...Hi,
I have a similar problem with the navigation bar. My users wish to be able to activate or deactivate the navigation bar while browsing.
Have anyone suggestions how this could be possible?
Aug 11
Zed Yap [Atlassian] says:
Hi Rene, I have a similar problem with the navigation bar. My users wish to be...Hi Rene,
I have a mere suggestion, you might want to create button and when you click on it you will be able to hide the Navigation Sidebar.If you are ok with that, please try the example code shown below:
## PAGE SPECIFIC DECORATOR ## Here the context is the page. Modes are 'view', 'edit', 'edit-preview', 'view-information', and 'view-attachments'. #set ($helper = $params.get("helper")) #set ($mode = $params.get("mode")) #set ($context = $params.get("context")) #set ($confPage = $helper.page) #infoPanelInitFromParams() ## GENERAL PAGE DECORATING BEGINS #requireResourcesForContext("page") #if ($mode != "edit" && $mode != "edit-preview") #parse ("/decorators/includes/content-navigation.vm") #end #if ($infoPanelRequired) <content tag="sidebar"> #infoPanel(true true true true) </content> #end <div id="content" class="page $!mode"> #parse ("/template/includes/actionerrors.vm") ## MODE SPECIFIC DECORATING BEGINS #* Display page based on mode: currently 'view', 'edit', 'preview-edit', 'info' and 'attachments. See the individual page templates (viewpage.vm, editpage.vm, etc.) for the setting of the mode parameter. *# ## VIEW #if ($mode == "view") #if ($space.personal) #set ($usernameFromSpaceKey = $spaceUtils.getUsernameFromPersonalSpaceKey($spaceKey)) #if ($permissionHelper.canView($action.remoteUser, $action.getUser($usernameFromSpaceKey))) <content tag="show-personal-sidebar">true</content> #end #end #requireResourcesForContext("viewcontent") #set ($labelable = $page) #permitSearchEngines() #if ($helper.isHistoricalVersion()) <content tag="suppressPdfLink">true</content> #end #parse ("/decorators/includes/page-metadata.vm") #if ($helper.isHistoricalVersion() || $helper.action.navigatingVersions) #versionInfo() #end #if ($action.isPrintableVersion() == false) <script> function hide() { document.getElementById("TohideTest").style.display="none"; } function show() { document.getElementById("TohideTest").style.display="inline"; } </script> <style> .spacetree * ul{ padding-left:0px; margin-left: 0px; } .spacetree * li{ margin-left: 5px; padding-left:5px; } </style> <input type="button" value="Hide" onclick="hide()"/> <input type="button" value="Details" onclick="show()"/> <table cellspacing="2" cellpadding="5" > <tr> <td valign="top" align="left" width="22%" bgcolor="#F9F9F9" class="noprint" id="TohideTest"> <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 #trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page)) #parse ("/labels/labels-editor.vm") #renderChildren() #applyDecorator("root") #decoratorParam("sitemeshPage" $sitemeshPage) #decoratorParam("page" $page) #decoratorParam("context" "comments") #end ## EDIT || PREVIEW-EDIT #elseif ($mode == "edit" || $mode == "edit-preview") $body ## INFO #elseif ($mode == "view-information") $body ## ATTACHMENTS #elseif ($mode == "view-attachments" || $mode == "move-attachments") $body ## FOR CUSTOM WEB-ITEMS #else $body #end ## MODE SPECIFIC DECORATING ENDS </div> ## GENERAL PAGE DECORATING ENDS #parse ("/pages/page-breadcrumbs.vm") #menuMacros_renderBrowseMenu()hope that helps.
Best rgds,
Zed
May 14, 2009
Anonymous says:
Hi, (In relation with the above comment) Include page tree macro within a round...Hi,
(In relation with the above comment) Include page tree macro within a roundrect macro
May 19, 2009
Anonymous says:
Hi Arie, Thanks for the reply. My first question was: I am trying to include t...Hi Arie,
Thanks for the reply.
My first question was: I am trying to include the pagetree within a roundrect macro. But the title, "Table of contents",appears above the roundrect macro with the horizontal ruler.I tried to comment the div tag for title and include in the wiki-markup directly. This works fine except, the horizontal bar does not show up. I used "four dashes" to represent the horizontal bar but then I cannot change its color.Trying to customize it through the CSS. Still working on that.But is there a way to work around this?
Thanks in advance.
Aug 11
Arie Murdianto says:
Hi, Could you please log this issue to our support system: https://support.at...Hi,
Could you please log this issue to our support system:
It would be easier to investigate your issue there.
Cheers,
Jun 17, 2009
Tim McDougall says:
Hello, I was curious how you (Atlassian) manage all of the documentation on the...Hello,
I was curious how you (Atlassian) manage all of the documentation on the sidebar. It looks like you have different spaces set up for each version of Confluence, and the current documenation is always under the spacekey "DOC".
1. How do you change the spacekey when you release a new version of Confluence?
2. How do you maintain all the different versions of documentation? Do you have seperate copies of each page in each space? Do you do anything special to re-use documentation that hasn't changed, or are there just a lot of identical pages across all the documentation spaces?
Thanks for any info you can provide!
Aug 12
Sashidaran Jayaraman [Atlassian] says:
Hi Tim, For the versioning query, you may want to take a look at Copy Space plu...Hi Tim,
For the versioning query, you may want to take a look at Copy Space plugin to create archive copies of the spaces. You also may want to read the following documentations for a better understanding of using Confluence for documentation:
Hope this helps.
Cheers
JSashi
Jun 18, 2009
Corey Hampton says:
Help please!! We just upgraded to Confluence 3.0 last night and my navi...Help please!!
We just upgraded to Confluence 3.0 last night and my navigation is no longer resizeable. It looks the same, but with no resizeable capability. I verified that the jQuery files we in the same location. I've been looking at the documention and Stephan's site mentioned above but I can not seem to fix it. Can anyone help me please?
Thank you - Corey
Jun 22, 2009
Giles Gaskell [Atlassian Technical Writer] says:
Hi Corey, Sometimes, after the Confluence developers have implemented new featu...Hi Corey,
Sometimes, after the Confluence developers have implemented new features into a major release of Confluence, minor updates are also implemented into the default Page Layout code to incorporate or account for new product features. This was indeed the case for Confluence 3.0.
Since upgrading to Confluence 3.0, have you tried re-implementing your Page Layout customisations into the new Confluence 3.0 default Page Layout code? If not, then it is likely that the new Confluence 3.0 default Page Layout code is missing from your space's current Page Layout and this might be causing the loss of resizing capabilities in your navigation tree.
Bear in mind that default Page Layout code is not automatically updated when you upgrade your version of Confluence, since this may damage your existing customisations.
To re-implement your Page Layout customisations into the new Confluence 3.0 default Page Layout code:
I hope this information helps and please let us know if this resolves the problem.
Kind regards,
Giles Gaskell
Technical Writer
ggaskell@atlassian.com
ATLASSIAN - http://www.atlassian.com
Jun 22, 2009
Corey Hampton says:
Giles, Thank you for your repsonse. It turned out to be the jQuery files....Giles,
Thank you for your repsonse. It turned out to be the jQuery files. They were not in the correct location and it took me a while to get that particular information.
Jun 24, 2009
Diane Sexton says:
Interestingly the changes to the Page Layout in Confluence 3.0 broke the Edit in...Interestingly the changes to the Page Layout in Confluence 3.0 broke the Edit in Word functionality for one of our spaces - the only one where we had customised (to implement the Navigation sidebar) was the only one that would not allow Edit in Word to natively open and edit wiki pages but forced us to open and save as an actual Word doc - similar to as described in Office Connector Troubleshooting
Resetting our layout to default and recustomising it to add the Navigation sidebar back in fixed the problem.
Jun 19, 2009
Anonymous says:
Is there a way for the tree to automatically expand to show the children under t...Is there a way for the tree to automatically expand to show the children under that topic when it is chosen?
Jun 22, 2009
Zed Yap [Atlassian] says:
Hi, As far as I know, the feature request is not available yet. However, there ...Hi,
As far as I know, the feature request is not available yet. However, there is an improvment request being raised in JIRA:
Please add your comments to the discussion, vote on it and add yourself as a watcher for future updates. Also, please bear in mind the following document on how we schedule features for inclusion in our products: Implementation of New Features and Improvements.
In the mean time, you might want to use the expandCollapseAll=true parameter.
Hope that helps.
Best rgds,
Zed
Jun 22, 2009
Steven Black says:
Thanks for the quick reply. Unfortunately, the tree is too large to expand all. ...Thanks for the quick reply. Unfortunately, the tree is too large to expand all. I voted for the improvement request and I guess I'll just cross my fingers.
Cheers,
-swb.
Jun 24, 2009
Corey Hampton says:
Does anyone know how to stop the width of the navigation from reseting every tim...Does anyone know how to stop the width of the navigation from reseting every time a page is refreshed? Some users like the bar smaller or wider than the default and I would like for it to stay the size the users sets it to. I thought I read somewhere that it was possible. I don't know jQuery, but I can copy code and modify it to work if anyone knows where I can find the code.
Thanks!!
Aug 12
Azwandi Mohd Aris [Atlassian] says:
Hi Corey, As far as I am concerned, you can set the minimum width of the bar (e...Hi Corey,
As far as I am concerned, you can set the minimum width of the bar (e.g. width="22%"). However, some pages may have a long title which will force the bar to expand. You may have to use the CSS property "word-break:break-all" to force the word wrap:
Please note that this trick works in IE, but not in other browsers. It is going to be part of CSS3 spec, which I think is just a matter of time before other browsers can support it.
Cheers,
Azwandi
Aug 19
anthony hornby says:
This is probably a dumb question .... How do I make the left navigation bar a r...This is probably a dumb question ....
How do I make the left navigation bar a right navigation bar?
Thanks a lot.
Anthony
Aug 19
Zed Yap [Atlassian] says:
Hi Anthony, This is probably a dumb question .... How do I make the left navi...Hi Anthony,
I was told by SSE that there is no such thing as dumb question
. Anyway, I think is possible. I have created an example syntax below, please give it a try.
Replace the default page layout:
With the following code:
#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" border='0' > <tr> <td valign="top" align="left" width="91%" class="pagecontent"> <div class="wiki-content"> $body </div> </td> <td valign="top" align="left" width="9%" bgcolor="#F9F9F9" class="noprint" nowrap> <div class="tabletitle">Table of Contents</div> <div class="spacetree"> #includePage($helper.spaceKey "TreeNavigation") </div> </td> </tr> </table> #else <div class="wiki-content"> $body </div> #endHope that helps.
Best rgds,
Zed
Aug 19
anthony hornby says:
Thanks! It did. It also gave me insight into how to modify this further for...Thanks! It did.
It also gave me insight into how to modify this further for myself next time :-)
*Puts on crash helmet and adjusts training wheels*
Full speed ahead .....
Anthony
Sep 15
anthony hornby says:
Is there any way to make this navigation sidebar float? That is it moves with t...Is there any way to make this navigation sidebar float?
That is it moves with the page as someone scrolls & the length of it doesn't force the minimum height of the page?
I'd really like to have the navigation bar not be setting the minimum hieght of the page as it means for pages with only a small amount of content the users have to scroll down to see any comments on the page unnecessarily.
All help appreciated.
Anthony
Aug 24
Jamie says:
In our instance when we apply this, if we have long noformat lines like below, t...In our instance when we apply this, if we have long noformat lines like below, they cause the page to be very wide. However, in a space with the default layout we get horizontal scrollbars on the preformatted panels. Do you know how we can make the long noformat lines behave in the same way with this layout?
cheers, jamie
Aug 24
Jamie says:
Looks like if the noformat block is in a table of any description you don't get ...Looks like if the noformat block is in a table of any description you don't get the horiz scrollbars.
Seems to be possible to do this with divs not tables, then the horizontal scrollbars work:
#if ($action.isPrintableVersion() == false) <style> .spacetree * ul{ padding-left:0px; margin-left: 0px; } .spacetree * li{ margin-left: 5px; padding-left:5px; } </style> <div style="text-align: left;"> <div style="margin: 0 auto; width: 99%;"> <div style="float: left; width: 22%"> <div class="tabletitle">Table of Contents</div> <div class="spacetree"> #includePage($helper.spaceKey "TreeNavigation") </div> </div> <div style="float: right; width: 78%" class="pagecontent"> <div class="wiki-content"> $body </div> </div> </div> #else <div class="wiki-content"> $body </div> #endAug 25
Zed Yap [Atlassian] says:
Hi Jamie, I have a mere suggestion you can try the overflow property from CSS s...Hi Jamie,
I have a mere suggestion you can try the overflow property from CSS style sheet. I have create a example shown below, hopefully
this will give you more idea on it.
{html} <style> div.here { border-style: solid; margin:10px 20px; overflow:scroll; height:100px; } </style> <div class="here">dsfds fds fds dsfds fds fds dsfds fds fds dsfds fds fds dsfds fds fds dsfds fds fds dsfds fds fds dsfds fds fds dsfds fds fds dsfds fds fds dsfds fds fds dsfds fds fds dsfds fds fds dsfds fds fds dsfds fds fds dsfds fds fds dsfds fds fds dsfds fds fds dsfds fds fds dsfds fds fds dsfds fds fds dsfds fds fds dsfds fds fds dsfds fds bvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvfdssdcsdcsdcsdcccccccccc dsfds fds fds dsfds fds fds dsfds fds fds dsfds fds fds ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc </div> {html}Hope that helps.
Best rgds
Zed
Aug 25
Jamie says:
Hi Zed, That's interesting but I don't see how that helps. Users are hardly goi...Hi Zed,
That's interesting but I don't see how that helps. Users are hardly going to use the above instead of the noformat macro. I just want the noformat macro to work in the same way regardless of whether the layout above has been applied.
My question really is:
1. What's wrong with using divs instead of tables for dividing the page, given that they seem to allow the noformat macro to behave in the same way as without?
cheers, jamie
Sep 15
anthony hornby says:
Hi Jamie, I am interested in knowing if you went ahead with this and if you fou...Hi Jamie,
I am interested in knowing if you went ahead with this and if you found any issues?
Thanks a lot.
Regards Anthony
Sep 16
Jamie says:
Hi Anthony, I went ahead with it in only one space out of the several hundred t...Hi Anthony,
I went ahead with it in only one space out of the several hundred that I need to, I don't think any issues so far. I've tried to summarise this additional problem here: https://www.adaptavist.com/pages/viewpage.action?pageId=42467485
cheers, jamie
Oct 30
Anonymous says:
Hi, I upgraded to v3.0.2 and Office Connector broke. The cause is this mi...Hi,
I upgraded to v3.0.2 and Office Connector broke. The cause is this missing line
'#requireResourcesForContext("page")' in the TreeNavigation custom code. The line should go here:
#infoPanelInitFromParams()
#requireResourcesForContext("page")
#if ($mode != "edit" && $mode != "edit-preview").
I would like to acknowledge this solution to Michael Jositz CONF-16055, 20090706.
Can the above code be corrected to include the missing line.
Regards,
Nathan.
Nov 03
Sarah Maddox [Atlassian Technical Writer] says:
Hallo Nathan Thanks for letting us know about this. The problem probably occurr...Hallo Nathan
The problem probably occurred because you need to re-apply the customisation after upgrading Confluence. I've added a note to the page about this, so that other people don't experience the same problem.
Thanks for letting us know about this.
Cheers
Sarah
Nov 10
Jeff Liu says:
How do you do this globally? i.e. It automatically applys to every page in every...How do you do this globally? i.e. It automatically applys to every page in every space. What are the steps? Thanks.
Nov 12
Jack Low [Atlassian] says:
Hi Jeff, To do this, you might want to add the customized code into "Page Layout...Hi Jeff,
To do this, you might want to add the customized code into "Page Layout" under global "Layouts". Bring up Confluence Admin page > Layouts > Customize "Page Layout", eg: you can replace the following code:
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"> <div class="tabletitle">Table of Contents</div> <div class="spacetree"> $helper.renderConfluenceMacro("{include:spaceKey=CON|pageTitle=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> #endReplace the spaceKey=CON with proper space key, and |pageTitle=TreeNavigation with proper TreeNavigation page (created in 'Space Pages' as described at the beginning of this documentation).
Hope it helps. Please feel free to raise a support request at http://support.atlassian.com/ if the problem still persists.
Cheers,
Nov 15
Emily Johnson says:
Can't figure out how to delete my comment. I figured out my problem. Thanks!Can't figure out how to delete my comment. I figured out my problem. Thanks!
Dec 17
Mathieu Filotto says:
Hi, How can we get the navigation sidebar feature used for the Jira 4.0 documen...Hi,
How can we get the navigation sidebar feature used for the Jira 4.0 documentation space.
This one is very very great !! A dynamically loaded and resizable tree, would love to propose that one to my users.
Thanks
Math
Dec 17
Mark Hrynczak [Atlassian] says:
Hi Math, The theme is available as a downloadable plugin. See this blog post f...Hi Math,
The theme is available as a downloadable plugin.
See this blog post for more info.
Glad you like it.
Mark
Dec 22
Matthew Stublefield says:
I really like it as well and would love to use it, but it overrides our colours ...I really like it as well and would love to use it, but it overrides our colours and whatnot. Is the only recourse to apply a custom space stylesheet?
Dec 22
Mark Hrynczak [Atlassian] says:
I'm not sure. Can you raise an issue and someone will get back to you with an an...I'm not sure. Can you raise an issue and someone will get back to you with an answer.
Jan 13
Anonymous says:
Hi, If you're currently using Confluence 3.0, is it possible to incorporate the...Hi,
If you're currently using Confluence 3.0, is it possible to incorporate the latest theme (Navigation Sidebar) found within Confluence 3.1?
Thanks
Jan 18
Sashidaran Jayaraman [Atlassian] says:
Hi, If you are referring to the Documentation theme , I believe this is not pos...Hi,
If you are referring to the Documentation theme , I believe this is not possible since the theme is not compatible with older Confluence versions. Let me know if I have misunderstood your question and feel free to clarify more.
Cheers
JSashi
Jan 26
Brian Carr says:
We seem to be having some problems after upgrading to 3.1 and it seems to be tie...We seem to be having some problems after upgrading to 3.1 and it seems to be tied to this customization. The theory on this end is that the use if tables is throwing things off, especially since the new Page Layout default does not use any tables, just DIVs.
Could someone from Atlassian speak to the changes in 3.1 and also provide an example of how to make this work in 3.1?
Add Comment