Attachment Macro: How do I hide the Download All option?

Jeremy Soronen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 14, 2015

Using Confluence 5.7.1

Not afraid to add/modify code if necessary.

We don't want people to have the Download All option for the Attachment Macro.   The PDFs shown in the Attachment Macro on a page are view-only and should not be downloaded by users from this page.   Is there a way to disable this option on a single page or all pages (if single page is not possible)?  We do want to allow downloading of attachments in different pages or spaces, but want to control it in this page and maybe others.

 

Thanks,

 

Jeremy Soronen

2 answers

0 votes
Branno
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 12, 2016

Howdy @Jeremy Soronen,

I know this is a little late, but I have a solution for you!

You can add the following to either the Global Stylesheet (for all pages), specific Space Stylesheets (for all pages in those spaces), or you can use the HTML macro (which needs to be enabled) to include it in specific pages:

a.download-all-link {
    display: none !important;
}
a#download-all-link {
    display: none !important;
}

The first block will hide the link generated by the Attachments Macro, while the second will hide the link displayed on the View Page Attachments screen. Hopefully this helps out!

Cheers,
Stephen Brannen | Confluence + Crowd Support

ITKSOLUCIONES
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 10, 2017

@stephen Brananen,  Does this work if confluence is an ondemand instance?  

I have looked and Have found PDF STYLESHEET Option, I did the change but nothing happened after saving. 

0 votes
Giuliano C_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 14, 2015

Hi Jeremy, 

 

Not sure if it would help you, but, you can find some codes in this doc, you can find some options on how to disable the download for specific attachments or for the whole space. smile

 

Cheers, 

Giu

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events