Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I just display count of Child pages without listing all the pages ?

bhanu shankar ahir August 11, 2020

How do I just only display count of Child pages  as a dashboard without listing all the child pages. 

 

Child Page macro gives me all the list, But I need to get the count of the child pages. Is there a Macro or a way to generate this ?

1 answer

0 votes
Tamas Baglyas August 12, 2020

Hi @bhanu shankar ahir,

I made a User Macros for you, what is giving back only the descendants count. You can copy and paste it in your Confluence:
Confluence administration -> User Macros -> Create a User Macro

#**
Atlassian Community answer
<a href="https://community.atlassian.com/t5/Confluence-questions/How-do-I-just-display-count-of-Child-pages-without-listing-all/qaq-p/1454582" target="_blank">How do I just display count of Child pages without listing all the pages ?
</a>
@author Tamás Baglyas - https://github.com/tbaglyas
@version 1.0
@since 2020-08-12
*#
## Macro title: Count of the descendants
## Macro has a body: N
## Body processing: No body, no processing.
## Output: Count of the descendants of the current page.
##
## Developed by: Tamás Baglyas - https://github.com/tbaglyas
## Date created: 12/08/2020
## Installed by: Tamás Baglyas - https://github.com/tbaglyas

## @noparams

#set ($descendantsCount = $pageManager.getDescendants($content).size())

$descendantsCount

Cheers,
Tamás

Blake Butcher February 21, 2024

This seems to include pages that are in trash. Is there a way to exclude those?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events