How can I list pages and spaces in Page Tree?
Asked by thomas king:

I am organizing all the pages and spaces within my organization. For the left side Page Tree navigation to make sense, some spaces would need to be subsidiary to other spaces. My left-side navigation would look like this:

USA (++**SPACE**++)

\>\>\>\>\>\>\>\> Wisconsin (page)

\>\>\>\>\>\>\>\> California (++**SPACE**++)

\>\>\>\>\>\>\>\> \>\>\>\>\>\>\>\> Marin County (page)

\>\>\>\>\>\>\>\> \>\>\>\>\>\>\>\> Santa Clara County (++**SPACE**++)

\>\>\>\>\>\>\>\> \>\>\>\>\>\>\>\> \>\>\>\>\>\>\>\> Cupertino (page)

\>\>\>\>\>\>\>\> \>\>\>\>\>\>\>\> \>\>\>\>\>\>\>\> Sunnyvale (page)

\>\>\>\>\>\>\>\> Idaho (page)

\>\>\>\>\>\>\>\> Florida (++**SPACE**++)

\>\>\>\>\>\>\>\> \>\>\>\>\>\>\>\> Miami-Dade County (page)

\>\>\>\>\>\>\>\> \>\>\>\>\>\>\>\> Putnam County (page)

\>\>\>\>\>\>\>\> Iowa (page)

I can't use a plugin; my organization will never pay for, support, or approve that. I want to use CSS, HTML, etc, which I can design and support myself. Also, I cannot modify existing structure. Spaces need to remain spaces.

Thanks!


Answers:
author: Rob Woodgate
body: Hi Thomas,

A word of caution: That's not how Confluence works. The sidebar shows you the pages that are in the space, it doesn't show other spaces. You probably won't find this easy, or find a perfect solution, because Confluence is not designed to show this kind of structure.

Having said that, you can customise the sidebar to use macros by adding wiki markup to the **Space tool** \>**Look and Feel** \> **Sidebar, header and footer** tab. So for example you could add the Page Tree macro to display the contents of another space (see the bottom of the [Page Tree macro help page](https://confluence.atlassian.com/confcloud/page-tree-macro-724765260.html) for the wiki markup to use.) I'm not sure how it would look, but you could replace your default page tree with a series of these macros displaying the pages and spaces you want.

comments: author: thomas king
body: I appreciate the answer, but this solution would put all the spaces at the same level. In my example above, these would be top level:

* USA, California, Santa Clara County and Florida at the same level.

And these would be second level:

* Wisconsin, Marin County, Idaho, Miami-Dade County

I would be lynched for proposing this.

Thank you for answering. I do appreciate it.


author: Rob Woodgate
body: Hi Thomas,

I'm not sure what you're trying to do then.

Do you mean that you want, for example, the California space to be an actual "subspace" of the USA space?

Or do you mean that you want the tree view to show a link to the California space as if it is a subspace of the USA space?


author: thomas king
body: \>Or do you mean that you want the tree view to show a link to the California space as if it is a subspace of the USA space?

Yes. I want the left nav page tree and top breadcrumbs to display the whole hierarchy, whether the entries are pages or spaces. Like in my original question.


author: Rob Woodgate
body: Hi Thomas,

Short of adding a series of Page Tree macros and indents using wiki markup I can't think of any way to do this.

You've mentioned in a comment below that you're "amazed that \[Atlassian\] didn't build this functionality into Confluence in the first place", but this isn't how Confluence is designed to work, nor is it a use case that it's designed to support. You can build a treeview on a page to include any space and any page, but it makes no sense for a space sidebar to show a user-designed tree of spaces and pages. The sidebar is designed to show the pages within a space; there is no "Confluence-wide" sidebar.


author: Mustafa Sualp
body: Hi Thomas,

I hope you are well!

We just started venturing into expanded use of Confluence across the entire company. I am utterly amazed space nesting does not seem to be possible out of the box.

Have you figured this out? (its been a while, so hope you did for your sake!)

Thanks in advance!

Best,

Mustafa


author: TomC
body: Hey Thomas,

I'm not aware of a way to make sub-spaces, but have you thought about making this hierarchy in ONE space? You can use page restrictions to limit access to various children and grandchildren pages, but it's that ability to easily make hierarchies with *pages* in a space that is the key point.

That's what we do and it works quite well (though we try to limit the page restrictions as they have to be managed).

Will this approach work for you? if not, say because you need complex permissions for every state, maybe a master space whose homepage is created using bullets and subbullets, but that's not the menu structure you desire, which you can get with the pages within a space approach.

comments: author: thomas king
body: I have I thought of it? Yes. As I said in my original message "*Also, I cannot modify existing structure. Spaces need to remain spaces.*" I do appreciate your response, however.

I work for a very large international corporation, with many organizations. It wouldn't be practical to put the whole site into a single space. Permissions, as you point out, would be nuts to administer. The multiple levels of administrators necessary would also be unworkable.

I am frankly amazed that Confluence didn't build this functionality into Confluence in the first place. My peers tell me this functionality was proposed, and was marked "resolved", but with no solution.

Thanks for answering.


Tags: confluence-administration