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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,922 views 27 12
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