Confluence - Get all attachments under a parent page

Hi -

Is there a way to get all the attachments into the attachment list under a parent page -- basically the structure is one overall space with several different pages as categories. These categories each have several child pages. I see the macro to get attachments from one page and the macro to get attachments from the entire space, but I can't find a way to get a medium amount - attachments from all child pages under one parent.

Any ideas?


2 answers

Yup. It's a bit tricky. You can use the search results macro, and the ancestorsId:id syntax. First, use the pagetree search macro to find out what the syntax is for finding children of your current page. It will be something like ancestorIds:525205600.

Then add a Search Results macro that uses the ancestor search as the "text" and limit the content type to attachments.

Thanks - that is exactly the search I'm looking for - however, is it possible to clean it up a bit? It would be nice if it could look more like the regular attachments macro giving us information about the attachments - user, created, versions, etc

Hmmm… that's less easy. And I think the answer is pretty much "no".

You could use the html or css macros (not bundled/enabled in Confluence by default) to modify the style. Or even apply css changes at the space configuration level (I think not in OnDemand).

You might be best off forking the, and adding the ability to have a tree instead of just a page. Also not an option in OnDemand.

0 vote
Stephen Sifers Community Champion Jul 17, 2014

You can easily do this:

Within the space accees the following: Space Tools > Content Tools > Attachments.

You should see a list of all attachments within all sub pages of your space.

Here is the confluence doc for this as well:

I guess I should clarify a bit - that gives me all the attachments off the space - that's too many:

-Space Home Page

1. Page 1

a. Child Page 1

b. Child Page 2

2. Page 2

a. Child Page 1

b. Child Page 2

What I want, is on the Space Home Page, is to display attachments in groups:

Group 1 - Page 1 attachments including all the attachments from the children of page 1

Group 2 - Page 2 attachments including all the attachments from the children of page 2

If I do everything from the entire space which is one of the gadgets in editing the page, it's too much, but if I do the attachments from a page gadget, it's only one page - I can't use it to select Page 1 AND get the attachments from the children of Page 1 - unless I'm missing something on how to configure it to do that.

Sorry for the long explaination - does that make sense what I'm trying to do?


Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

370 views 20 10
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