Creating a page tree for pages with a specific status on them
Asked by Barbara Szczesniak:

I am writing a user guide for an application developed by my company. At the top of each page, I have used a status lozenge to indicate which roles in the application the page content applies to.

![TopofPage.png](https://community.atlassian.com/t5/image/serverpage/image-id/306214i042540B28E28B360/image-size/large?v=v2&px=999 "TopofPage.png")

I thought this was a colorful and attractive way to do this.

Now, I want to create a ++Documentation by Role++ page (or set of child pages - 1 for each role). where a Patient Liaison, for example, can go and see all of the pages in the user guide space that apply to their role.

I am looking for something like the **Child pages** macro, where I could set the **Parent page** to the top page of the space and display the pages in a tree format, so the user can see where the pages fall in relation to their parent topics. The only thing that's missing is my ability to specify that I only want pages that have this ++specific Status++ on them.

I'm hoping someone here can help me out with this, so I don't have to go build a bulleted list for each role by hand. Is there some nice macro that I am not aware of or some other approach that you can think of?

I'm trying to avoid paying for a 3rd-party app (since I'm fairly sure my boss will go for the more cost-effective method of doing it by hand).

Thank you!

EDIT: Forgot to mention that I tried the Content by Status macro. For some reason, this returned only my 2 template files, rather than all the other pages I've used the Status I tested on. Also, this just gives you a straight list, rather than a tree with the structure.


Answers:
author: Bal?zs Szak?l _META-INF_
body: Hi [@Barbara Szczesniak](/t5/user/viewprofilepage/user-id/5187859)

Our cheap app can list pages with a selected page root. It is called [Advanced Content Navigator for Confluence](https://marketplace.atlassian.com/apps/1218865/advanced-content-navigator-for-confluence?hosting=cloud&tab=overview).

Here you can overview page statuses, overview whats changed and insert multiple macros if needed:

![Screenshot 2023-11-14 at 15.52.02.png](https://community.atlassian.com/t5/image/serverpage/image-id/307786iE3891422FB974763/image-size/large?v=v2&px=999 "Screenshot 2023-11-14 at 15.52.02.png")

Give it a try, and contact me if you have extra needs we could deliver! :)

BR,  
Balazs

comments: author: Barbara Szczesniak
body: Thank you for your response, [@Bal?zs Szak?l _META-INF_](/t5/user/viewprofilepage/user-id/84391). My user document is not organized by user role, but by task, with a list at the top of the roles the page applies to (using a Status macro for display purposes).

If I could order the Content by Label macro output to be sorted by the order of my page tree (with child pages nested under parent pages), I would take the effort to go add the labels to each page.

I'm thinking that it will take less time for me to simply manually add a list of links to the applicable pages on each role page.


author: Bal?zs Szak?l _META-INF_
body: Hey,

Filtering our page tree based on some data (status or label) is something we already considering. Can you verify my understanding, if there would be an option to show pages in the tree with specific label/status, that would solve your problem, after you would label you pages properly?

Would whitelisting be enough (name the labels you WANT to show), or blacklisting should be useful as well (list what you DONT WANT to show)?

Thanks in advance!


author: Barbara Szczesniak
body: I want to be able to show a page tree where the page contains one specific Status---Accounting Officer list shows a tree with all pages that contain the ACCOUNTING OFFICER Status. Basically, the **Child Pages** macro with an **Include pages with Status** parameter.

If a Label parameter is easier to program, I could add labels for each of the statuses on the page, but I don't actually want to show labels on the pages or give other users the ability to add labels that might affect the output of the macro.


author: Barbara Szczesniak
body: I found this Jira ticket about adding the Page Status to macros and added my use case for additional statuses on the page in a comment: <https://jira.atlassian.com/browse/CONFCLOUD-74397>


author: Kristian Klima
body: Hi [@Barbara Szczesniak](/t5/user/viewprofilepage/user-id/5187859)

What about Content by Label + Excerpt

Aggregate page:

![Content by label.png](https://community.atlassian.com/t5/image/serverpage/image-id/306302i6C340EBAA34DEEDA/image-size/large?v=v2&px=999 "Content by label.png")

Individual page (has all the right labels)

![2024-02-14_09-16-22.png](https://community.atlassian.com/t5/image/serverpage/image-id/306303i3F62803B8810E16D/image-size/large?v=v2&px=999 "2024-02-14_09-16-22.png")

comments: author: Barbara Szczesniak
body: Thanks, [@Kristian Klima](/t5/user/viewprofilepage/user-id/5074962) . In my edit, I should have said that I tried the Content by Label, not Content by Status. (I had already deleted this attempt from my page, but reverted and saw the correct macro name.) This only returned my templates, which makes me think that I included labels on the templates way back when I created them and only have the statuses on my regular pages (no labels).

Content by Label also gives a list that is sorted alphabetically or by created or modified date. I am looking for the tree structure to give readers a context for what topics the pages are related to.


Tags: cloud

confluence-cloud

macro