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 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.
Question: How does one exclude the favourites?
(and why are these labels, in the first place?)
Thanks @Bill Bailey , it works fine:
#foreach ($label in $content.getLabels())
#if ($label.getName() != "favourite")
<a id="clickable-label" class="aui-label" href="$req.contextPath/label/$space.key/$label.getName()">$label.getName()</a>
And it could be improved by using a ' while ' condition ;-)
Hi, Confluence collaborators! As part of #Confluence-Collaboratory month, we’ve created a very special Mythsbusters segment, where we're dive into an interesting myth and uncover the truth behind i...
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