Count of Pages in a Space

I would like to get a count of the number of pages in a space and place it on a page. I'm guessing writing a macro will accomplish this but I am not sure how to write it. I've looked over all of the documentation, but it hasn't really helped. 

On the page itself it would look like: "There are {PageCountMacro} pages in this Space." and rendered it might look like: "There are 8 pages in this Space." if there were 8 pages in that particular space...  

1 answer

This widget could not be displayed.
Ann Worley Atlassian Team Jul 27, 2017

Hi Christopher,

I found a similar question in the Community which had lots of answers: How many pages in a space? Some user macros were recommended, including Count pages in space. So you may not have to write your own macro. :)

Thanks,

Ann

Thank you Ann! I've tried $spaceManager.findPageTotal($space) which does return a number. However, it appears to be returning a number that is double the number of pages. Any suggestions?

Update - I tried on a few other spaces, and it is not always double the number, but it is always more... I don't have any pages in the trash, so that shouldn't be an issue.... Thank you!

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 17, 2018 in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

566 views 7 6
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