How to Get a Listing or Count of Child Pages Under a Parent Page
Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.
For purposes of auditing or organization, Confluence administrators may find it useful to see which pages are nested under a given parent page, and how many. This is helpful when examining a large space, to see which branch in the page tree contains the most pages.
- Via the UI, by editing the page and grabbing the "pageId" value from the address bar
Via the database, by running:
SELECT contentid FROM CONTENT WHERE prevver IS NULL AND title = 'Your Page Title';
Run a query below, depending on what you want to do:
Getting a listing of all pages (pageId and title) under the parent
SELECT c.contentid, c.title FROM CONFANCESTORS a JOIN CONTENT c ON a.descendentid = c.contentid WHERE a.ancestorid = '<parent_page_id>';
Getting a total count of pages under the parent
SELECT COUNT(*) FROM CONFANCESTORS WHERE ancestorid = '<parent_page_id>';
- How to find the number of pages, blogposts, and attachments in a space
- How to find pages in Confluence with a certain number of labels