Displaying the labels of a page within the same page

Is it possible to display the labels attached to a page within the page content itself?  We would like to use the include macro to include Page A within Page B.  However, Page A appears without showing the labels we have attached to it.  We would like the labels to show somehow.  Is there a macro we could use to show the labels of a page within the same page content?  Thanks!

 

   

2 answers

0 vote
Davin Studer Community Champion Oct 27, 2014

This could be done with a user macro. He is a very quick basic example. You would want to fill it out to meet your needs.

## @noparams
#foreach($label in $content.getLabels())
$label.getName()
#end

Hi Davin,

Thank you for your reply!   We tried the user macro that you had provided, but it doesn't seem to be supported by the Cloud.  Is there another way?   

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Tuesday in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

384 views 17 9
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you