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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

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

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

 

Cheers,

Mike

No worries, Mike.

Take care, and have a pleasant week.

Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- 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...

454 views 24 9
Join discussion

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