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.
What I want is to get rid of that message ie. if there are no pages, then nothing is shown:
I can modify the html in 'edit' mode but obviously that is lost when I publish. Any ideas?
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.
- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...
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