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

How do you exclude the "Favourite" labels in a custom macro?

I have a macro that prints the labels on a page, so that I show display the labels above the fold in our knowledge base.

I've actually created two, which I have sourced from here and here.
Both work perfectly well, in that they print the labels on the page.

But.
I have recently noticed that when users have clicked "Save for Later", this then gets included as a label. In the one macro, this gets printed just as the word "favourite", in the other, it is printed as "my:favourite" (or the username of the person it not myself).

If multiple people have saved the page, then that many "favourites" appear in the macro.

Screenshot 2020-11-02 at 16.48.00.png

Question: How does one exclude the favourites?

(and why are these labels, in the first place?)

1 answer

0 votes
Bill Bailey Community Leader Nov 02, 2020

I was unaware of these labels, but they make sense as an easy way to mark these pages.

To fix your issue, you are going to have to filter your output (test each label to see if it contains "favourite" before listing on a page.

Suggest an answer

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

Announcing Team Calendars in Confluence Data Center

Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond.  A long time favorite,  Team Cale...

146 views 0 5
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