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

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?   

0 votes
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

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,522 views 25 14
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