How to show recent updated contents with its labels?


I hope to get the recent updated contents information with their labels.

Just like this Atlassian Answers's top page.

This is because "Recent update macro" does not display labels of each pages, so it 's not easy for users to understand the content information only with its page title.

Any ideas, including plugin informations are appreciated.

1 answer

1 accepted

1 vote
Accepted answer


Not sure if there is a macro to do that (probably is), but it is quite easy to achieve with a simple user macro (

Something like this to start with:

## Macro title: Recent Pages
## Macro has a body: N
## Developed by: Vertuna llc
## Date created: 26/11/2014
## This is an example macro

## @param Space:title=Space key|type=string|required=true|desc=Space key

#set ($pages = ${pageManager.getRecentlyUpdatedPages(5, $paramSpace)})
#foreach ($p in $pages)
  <h3><a href="$p.urlPath">$p.displayTitle</a></h3>
    #foreach ($l in $p.labellings)
  <a class="aui-label" href="$l.label.urlPath">$</a>

There is a limit of 5 set to getRecentlyUpdatedPages method, you can change it to anything you like, or make it parametrisable if needed.


Hi, Sash, thanks for the answer and taking your time! Since I want to get the recent update contents of all the spaces, then I changed the $paramSpace to 'null'. If I am allowed to ask for more, I wish "Show More" link is enabled, which allows users to see older pages/news/blogposts. Also, it seems "favorite" labels which added by current user are included in the results, I hope to exclude "favorite" labels. (Maybe this is not so difficult.)

Yes, to look for all spaces 'null' should be used as a parameter to getRecentlyUpdatedPages method, according to, java.lang.String) As for "Show More" link.. it does depends on how you would need to implement it. If just a link that shows already rendered pages list then it is doable using the UserMacro with not so much effort, but if you need this to be dynamically loaded then you probably would go with a "normal" custom confluence macro and how something as rest endpoint defined to load "next" page of pages (unless there is a rest api already to do that) "favorite" labels you can just exclude by name from showing, as user "favourite" is just a label with this "constant name", see more about labels:

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Dec 18, 2018 in Confluence Cloud

Happy holidays from our team to yours!

Hi Community!  2018 was filled with changes for our team, both big and small, and we've taken a lot of time to both celebrate our wins and recognize areas of improvement. One thing that we're a...

484 views 3 18
Read article

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