Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a new label through Attachments macro?

richard.wilkinson October 21, 2022

Hello,

I have a standard page template that includes several copies of the attachments macro. Each copy has a set of labels that filter a subset of the attachments into that macro. Typically, this is by version number so when I make a new page from the template, I also update the labels that I want to filter by.

Is there a way to add a label to the allowed list of labels to filter on, even if nothing is yet labelled with that label?

The Attachment Labels box in the Attachments macro editor only lets you choose from "existing" labels. This is a bit annoying because generally when I create the page, there are no attachments which have these labels - they will be added to the page later and labelled then. I have to go back and edit the macros once the labels exist.

It would be nicer just to be able to set up the page in one go, so that when people start adding labelled attachments they show up in the right place.

As a side question, how is the list of allowed labels populated? I tried creating the new labels on attachments on a different page (both in the same space, and in a different space) but those labels did not immediately appear in the list, even after closing and reopening the editor (macro and page). It does let you filter on the label once you've added an attachment with that label to the page itself. Where does it get the list of allowed labels? I would expect it to be all labels in Confluence. Is there expected to be a delay before any new labels can be chosen from the filter list?

Thanks,

Richard

2 answers

0 votes
Nic Brough -Adaptavist-
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.
October 21, 2022

I'm afraid the attachments macro does not have any function to allow the creation of new labels.

Even if it did, it could not do what you're asking for because labels can only exist on content - you can't create a label independently of content - they have to be applied to at least one content object (page, blog, space, attachment, etc)

0 votes
Andy Gladstone
Community Champion
October 21, 2022

@richard.wilkinson great question! I am moving this from the Questions for Confluence collection to the Confluence Questions collection. Questions for Confluence is an Atlassian owned add-on app, and this is the space for questions regarding that app. Confluence Questions will get more eyes on this for you, and hopefully an answer.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events