Confluence - Get all attachments under a parent page

Neil Taylor July 16, 2014

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?

Thanks!!

3 answers

3 votes
Don Willis
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 20, 2014

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.

Neil Taylor July 20, 2014

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

Don Willis
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 20, 2014

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 https://bitbucket.org/atlassian/confluence-attachments-plugin, and adding the ability to have a tree instead of just a page. Also not an option in OnDemand.

Bernd Schneider July 24, 2018

Hi!

a bit late, but I want to add a question to the topic. I wanted to search for attachments under a page tree and tried the 'with ancestor' option from the 'Add s filter' function in the advanced search page. I don't want to use the macro, because I don't want to add/edit a page somewhere. This doesn't work at all.

What I did:

  • open advanced search
  • specify space
    => attachment appears in the result list
  • 'Add a filter' 'With Ancestor' with the page, the attachment is attached to (or another one above that)
    => the attachment (and all other attachments) vanishes from the list

My guess is, that Confluence treat attachments as if they have no ancestor at all. Can't say since when this is the case.

I would say this is a bug.

Best regards,

Bernd

Like Jassim Abdul Gafoor likes this
Bernd Schneider February 20, 2020

Any news on this topic?

Like # people like this
0 votes
Andreas Schuler June 17, 2020

Nothing's happened here for quite some time...

I also have the problem that I want to have the attachments of a parent page and their child pages together like a "table of contents".

  • The Attachments macro only shows the attachments of one page.
  • The Space Attachments macro shows all attachments, but can't be restricted to a page tree.

Does somebody know a solution or an addon where I can filter the space attachments for a page and their child pages?

Bernd Schneider June 17, 2020

No, unfortunately not. And since Atlassian seems to take no care at all for the customer's needs (there are many other problems which are not handled and the number is growing), maybe it is time to think about a different software solution from another provider ...

Larry October 5, 2020

Like what?

Larry August 17, 2021

It's really sad that I ended up here again and see my own comment.

Bernd Schneider August 17, 2021
  • Search functions doesn't work properly for e.g. searching for macro usage
  • Compare of page versions is almost unreadable, especially if macros are used
  • Rendering is often a problem (e.g. blocks of text inside macro rendered empty)
  • ...

There are many issues going on for years now.

0 votes
NotTheRealStephenSifersNOPENOPENOPENOPE
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 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:

https://confluence.atlassian.com/display/DOC/Viewing+Attachment+Details

Neil Taylor July 17, 2014

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?

Thanks!

NotTheRealStephenSifersNOPENOPENOPENOPE
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 17, 2014

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events