Display count of items listed on a page

Kate Reeder
Contributor
September 24, 2024

Hi folks - anyone know of a way to systematically count the number of items listed on a page in Confluence (cloud)? Here's my use case - I am using an embed link on a Confluence page to display a list of project we have in Atlas (Platform Experience), this list is filtered by status per the embedded link. See image below. The embed link is in an Expand macro so I can list all the different statuses from Atlas, allowing users to open the desired status to see the list of projects aligned with that status. I'd like to include a count of the projects listed in each Expand macro, thus giving the user a count of the projects in each status. I'd love to present these counts at the top of the page, above all the expand macros to show a total of the number of projects in each status... but if the only option is to include a total count within the corresponding Expand Macro I can live with that. Am trying to do this systematically so the counts update automatically as the projects change status. 

I haven't found an obvious existing macro to use for this, so I'm guessing some HTML or JavaScript may be needed to get what I'm after. 

I'm hoping someone in the community has done something like this and can point me in the right direction. 

THX in advance for your ideas and help!!

confluence-proj list image.png

1 answer

0 votes
Kristian Klima
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 24, 2024

Hi @Kate Reeder 

You may want to check Count for Confluence - it claims it can count macros and other things.

"Also want to know the total number of words, characters (w/ & w/o spaces), paragraphs, lines, images, and macros on a Confluence page?"

As your items are nicely in lines, I'm thinking along the way of using the app to count lines in the specific expand. It's kinda like 'count what you can to get the count of what you want' hack but it might work.

 

Disclaimer: I did not use the app and I'm not affiliated with the vendor, I just found your use case intriguing. There might be other stuff counting apps in the Marketplace, which might work if the count the lines hack works.

Kate Reeder
Contributor
September 25, 2024

Thank you for the suggestion, @Kristian Klima !

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events