How can we make a table of all pages with a specific label, with the status for each?
Asked by Sara Figueroa:

We are new-ish to Confluence and trying to figure out a way to do this. We want include a section on our space dashboard that shows a table of all pages labeled "Active," that shows the status of each of those pages. The ability to filter/sort this table by status would be awesome as well. Any help much appreciated!

------------------------------------

*Update w/ further detail*

![Screen Shot 2018-09-14 at 3.31.22 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/32331iB42A8CD670B5E209/image-dimensions/628x61?v=v2 "Screen Shot 2018-09-14 at 3.31.22 PM.png")

Here's a visual of the table we're trying to create. We want this table to be populated automatically by all projects labeled "Active". On the page for Whole Home Estimated Breakdown, for example, we insert the Status macro and set it to **In Progress** (we just inserted the Status macro directly into the table here for illustrative purposes).

When editing that page, if we adjust the Status macro there, we'd like that to also update on this table on our Dashboard. It would be even better if we could adjust the status from either place, and have it update in the other.

Basically, we currently use several tools for task management and tracking details of our projects (we being the in-house design team for a small company). We currently use a mix of Confluence, Jira for tracking development-related projects, and Monday.com as a task manager. We are experimenting using Trello integrated into our dashboard, but it's pretty unwieldy if you have more than a small handful of tasks and statuses for each task. We don't love everything about Monday.com, but it is at least easy to update on the fly.


Answers:
author: Henning van Ackeren
body: Hi Sara,

if you want to have a table with some of the page's properties (like a status)you may want to use the page properties report macro. It can filter pages by label and renders a table as a result.

All pages you want to appear in the table need to have a page property macro used in them. Within that macro you can define a property "status" and others.

If you want to go that way it's a good a idea to create a page template that contains the page property macro with "status".

Best, Henning

comments: author: Bill Bailey
body: I built something similar to this where we needed a top-level report (using the page properties report macro). To make the status entry consistent, I also create a user macro to control the user options of the status macro (text and colors). And as Henning said, I built a template for the child pages with this macro already included in the page properties table.


author: Henning van Ackeren
body: Bill,

that's interesting - would you mind sharing the user macro code?

I was looking into such a user macro, but gave up at some point, due to lack of knowledge about user macros.


author: Bill Bailey
body: Hi Sara,

Here is the code for a user macro setting four statuses (statusi?) with predefined colors. Also there is a trick to force a sort order (a hidden number). User macros are very powerful, and this one will show you a few tricks.

So with this simple macro, you have far less issues with users picking their own settings and colors, plus it is a lot easier to just select a setting and go.

```
## Macro title: Priority
## Developed by: Bill Bailey, MarketCom, LLC
## Date created: 2018.09.06
## Version: 1.0


## @param Priority:title=Priority|type=enum|enumValues=Critical,High,Medium,Low

## Set value pairs for status macro instances
#set($priorityvalues = {"Critical" : "Red", "High" : "Yellow", "Medium" : "Green", "Low" : "Blue"})
#set($priorityorder = {"Critical" : "1", "High" : "2", "Medium" : "3", "Low" : "4"})


 <div class="content-wrapper">
 <p style="white-space: nowrap;"><span style="color:#FFFFFF;font-size:10px;margin-right:-5px;">$!priorityorder.get($paramPriority)
 <ac:structured-macro ac:name="status" ac:schema-version="1">
 <ac:parameter ac:name="colour">$!priorityvalues.get($paramPriority)</ac:parameter>
 <ac:parameter ac:name="title">$!paramPriority</ac:parameter> 
 <ac:parameter ac:name=""/>
 </ac:structured-macro>
 </span>
 </p>
 </div>
```


author: Sattesh M
body: Hello Sara, I'm not sure about the "table" format, but we can list all pages with a certain label like "Active" to display, filter, and even sort them using the Content by Label macro.

* [Content by Label Macro](https://confluence.atlassian.com/confcloud/content-by-label-macro-724765178.html)

Can I know what you mean by the "status" of the page however?

Do let me know if you have any questions.  

Cheers,  
Sattesh

comments: author: Sara Figueroa
body: There is a "Status" macro that we add to pages to indicate where we are on the project, i.e. "In Progress" or "Review Ready".

We tried the Content by Label macro initially, which works to show all projects we have labeled as "active," but we want to also show the status of each active project on that same view.


author: Sara Figueroa
body: That way on our Dashboard, we have a list of all "active" projects, and we can see what the status for each of those is, as well as go straight to the page from there. When editing the page for that project, if we update the Status macro on said page, it will also update on the Dashboard. If that makes sense?


Tags: cloud

confluence-cloud

label

status

table

user-macro