It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Page Tree as part of a customized global layout

Christ Christ Jan 18, 2012

We are using a custom layout for our Confluence 3.5.13 site, and are using the Global Theme. We recently added the DOC space to include the local 3.5 Confluence Documentation as part of our Confluence site. We would like to apply the custom layout to the DOC space but are unable to get it to work with the Documentation Theme in this space. We have tried to create a custom layout for the space but it is not recognizing the page tree. I've read the user community posts and the Atlassian documentation but haven't found a solution to our problem. In our code, it calls it this way:

<div class="spacetree">

#includePage($helper.spaceKey "TreeNavigation") </div>

but we see a Page Not Found error instead of the tree navigation for the space. I've read related posts but have not found a solution to this issue. Any ideas how to apply our custom layout to the documentation theme in this space?



3 answers

0 votes
Andrew Frayling Jan 18, 2012

Hi Christi,

Probably a daft question, but do you have a page called "TreeNavigation" in the root of the space you are trying to apply the custom layout to?


Christ Christ Jan 18, 2012

Hi Andrew,

Not a daft question at all! Yes, I have a page called TreeNavigation at the top of the hierarchy in the space.


Andrew Frayling Jan 18, 2012

Hmm, permissions issue? The TreeNavigation page doesn't have any view level resitrctions on it does it?

Christ Christ Jan 18, 2012

There are no view restrictions. There are edit restrictions on the Documentation Home Page but nothing on the TreeNavigation page.

0 votes
dy raffy Jan 18, 2012

please see this link:

I think, this should help.


Christ Christ Jan 18, 2012

Thanks, Raffy.

This is where I found the information to add the sidebar. The code is correct but it is not calling the page for some reason.



0 votes
Mark Mackay Jun 21, 2012

I'm was just having the same problem, and think I worked it out.

#includePage($helper.spaceKey "Menu")

in the "Main Layout" decorator (includes/main.vnd) then I always get a "Page not found" error.

If i move the same line of code into the "Page Layout" decorator (decorators/page.vmd) then it will work.

I was banging my head against the wall, and then as I was writing a 'me too' reply to this post, I tried replacing the line of code with this, and it worked:

#includePage("PORTAL" ".menu")

It seems $helper.spaceKey is not set on the "Main Layout" decorator. So by specifying the space code manually (e.g. "PORTAL" for my case) it works. So now I can at least create a global navigation/header template using standard Wiki Markup, just not per-space.
Nicholas Lun Jan 16, 2013

I tried this as well. I found that this as well as using #includePage($spaceKey "TreeNavigation") works for main.vmd. However, while I can see the page tree being displayed, it can't seem to find any of the pages (i.e. it displays a empty page tree).

Update: If I include a pagetree in the page, the pagetree in main.vmd displays the pages correctly. Taking the pagetree withing the page away and the pagetree in main.vmd displays an empty pagetree again... weird

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Confluence

Confluence CVEs and common questions

Two vulnerabilities have been published for Confluence Server and Data Center recently: March 20, 2019 CVE-2019-3395 / CVE-2019-3396 April 17, 2019 CVE-2019-3398 The goal of this article is...

951 views 0 19
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you