Any way to show contents of different space with pagetree macro?

According to this bug:

You can't show the contents of a difference space in a pagetree, but I was wondering if anyone had a workaround short of fixing and then recompiling the plugin (assuming the source is available).

matthew horn

3 answers

1 accepted

1 vote
Accepted answer

I have tried a workaround in the past where I created pages in the current space that includes pages from other spaces using page include macro.

The content in this case will be maintained in a single place but is available in both the spaces - including in the page tree of both spaces. Not sure if it will work for you or not!

Hah! I just thought of trying that. Thanks, guys, I'll give it a whirl.

The way my site is structured, is that every "area" of the site (like Documentation, What's New, Samples, and Tutorials) has a separate space for a landing page and a content space. We do this because the landing pages are highly customized mix of HTML and CSS.

The results are stunning (if I do say so myself), but issues like this are real setbacks if not worked around.

matthew horn

We did something similar. I have a page named LocalSearch in each space (use Browse Pages then add your page here, so that it is not under the root of the home page). This page just includes the pagetree macro.

So instead of using the pagetree macro, use the IncludePage macro specifying the spacekey of the space you want to search, and the LocalSearch page that you made.

Tried it and it works great. Thanks again!


Brilliant. A quick and easy fix. Thanks!

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

1,462 views 114 8
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you