Aggregate label of current page and use it in a macro.

Hi, I'm creating a template for landing pages of tools being used in the company. I want to create a single page for each tool. In my template I want to have a section, where I'm aggregating content by label. Because I want to automate as much as possible, I would appreciate having a predefined macro, which aggregares the (single) label of the page plus another label.


I have a section in my tool-page called How-Tos and I want to generate a list of all pages labeled with the label howto plus the label of my current page (name of the tool). In this case, the user would not have to change anything in the section How-Tos.


If the label of the current page is msword:


Is there any way to do it? We're using Confluence 3.4.

2 answers

1 accepted

Thanks matt,

I have found a solution and wrote this small user macro

## @noparams

to get the current page's labels, use the $content objects getGlobalLabels() method:




Suggest an answer

Log in or Join to answer
Community showcase
Louis De Jaeger
Posted Thursday in Off-topic

Friday fun: your best joke

Hi all Lets make this Friday fun really fun and post one (or more) of your best jokes! The joke can be about an Atlassian product, or just a really fun joke you want to share! I’m not the best j...

175 views 12 3
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot