It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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_Spaniol Atlassian Team yesterday

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,


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




Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence Cloud

Convert your old pages to the new editor

Hey Community 👋, Following the recent release of the new editor, we will be releasing the ability for users to convert existing pages from the legacy editor to the new editor. We’ve been resp...

1,383 views 17 15
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you