Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

User Macro: List all pages by the lable and manipulate them


In my user macro I am trying to list all pages through my confluence for defined label and then manipulate them (for example, sort by name). 

I was searching through pageManager, but was not able to find what method can do it. Any ideas?


1 answer

1 vote
Dominic Lagger Community Leader Aug 21, 2020

Hi @Vladimir Vakhlov 

Here is an user macro which shows 10 pages of the label "test".

You get an list of ContentEntityObjects. You can try to sort the list.

#set( $label = $action.getLabelManager())
#set( $pageList = $label.getContentForLabel(0,10,$label.getLabel("test")).getList())

#foreach( $page in $pageList )

Hope this helps you

Regards, Dominic

Like Dominic Lagger likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence Cloud

Introducing Confluence Cloud for Microsoft Teams (Available for Preview!)

Hi Atlassian Community, Remote work has shifted how teams collaborate, and we’ve heard from many of you that Microsoft Teams has become mission critical to many of your workflows, from how you chat...

2,539 views 21 21
Read article

Community Events

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

Events near you