Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

ContentByLabel Macro - how to disable the message block when there are no labels

mike @ mindbridge February 14, 2020

If you use the ContentByLable macro you get a lovely list of pages.  Looks good.

If there are no pages with the label you get a <div> with a message saying that there are no pages with that label.  A big gray <div> that doesn't fit properly in say a table and that looks like heck in a mobile page.

Screen Shot 2020-02-14 at 10.38.11 AM.png

What I want is to get rid of that message ie. if there are no pages, then nothing is shown:

Screen Shot 2020-02-14 at 10.39.35 AM.png

I can modify the html in 'edit' mode but obviously that is lost when I publish.  Any ideas?

 

1 answer

1 accepted

0 votes
Answer accepted
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 21, 2020

Hello Mike,

Thank you for raising this issue. There have been requests in the past to disable the graphic when there is no content, but they were closed as we don't have plans to implement that in the near future:

There's not a way of that I'm aware of to change that manually, and due to the functional differences in Confluence Cloud, it causes HTML and CSS changes to the page not to work properly.

I'm not aware of any add-ons that would be able to help you with this in Cloud, but perhaps ScriptRunner might be able to help automate the same results? I know that it's able to work more deeply with labels, so that can be a possibility. See labeling add-ons from Atlassian Marketplace.

I'm sorry that I don't have better news for you. Just let me know if you have any further questions about that.

Take care,

Shannon

mike @ mindbridge February 21, 2020

Disappointing but thank you for the reply.  I hope your day is a good one.

 

Cheers,

Mike

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 24, 2020

No worries, Mike.

Take care, and have a pleasant week.

Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events