Change the filename column for all attachment pages in Confluence

James Roberts January 16, 2014

Is there a way to configure the width of the filename column on the attachment pages in Confluence? Is it a setting in a config file or something that could be handled with css?

Any help would be appreciated.

2 answers

0 votes
Davin Studer
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.
January 16, 2014

You could change the size with css by targeting td cells with a class of filename-column and set the width.

td.filename-column {width: 50%};

However, I don't think that will really get you what you want as long file names actually get truncated and have a "..." placed at the end prior to the page being sent.

To really get around it you would also have to add in some javascript to check if the url contains "viewpageattachments.action?pageId" and then loop through the td tags and get the value in the title attribute and replace the text of the nested anchor element of the td.

You would have to put the javascript in the global custom html. Or you could create a Speakeasy extension. I have moved to putting custom javascript in speakeasy extensions. It makes the cutomizations more modular and easier to turn off if it messes up stuff.

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
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.
January 16, 2014

I don't know the answer to your specific question, but, I do know it is very annoying the way it currently works :(. I assume you are talking about the attachments view for a page and not the attachments macro? I gave up on both of them and now ship the Attachment-table macro with the Table Plugin for Confluence which provides a customizable list of attachments in a Confluence table. It solved a number of use cases I had relating to listing sets of attachments. By placing the macro on the page, you can avoid the need to go to the attachment's view for many cases.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events