Replicate native blog post table of contents on a page?

We have started some blogs and are feeding them onto a page in our space using the {blog-posts} macro. Unfortunately, this macro does not allow for time intervals more sophisticated than "posts from the last week" or "posts from the last x number of days."

We will have a large collection of posts pretty quickly and would like to allow people to browse the archive from the page, rather than clicking through to 'viewrecentblogposts.action?key=SPACEKEY' in order to see the native blog table of contents.

How can we replicate this table of contents, which appears natively on 'viewrecentblogposts.action?key=SPACEKEY' on the blog page?

screenshot of toc we'd like to replicate on page

2 answers

1 accepted

0 votes
Accepted answer

I didn't quite find the solution but this Adaptavist macro is a good stopgap for me. Hope it helps others.

There is no out of the box macro that shows this table of contents. You can always write a custom macro that searches for blog posts and displays a nice table of contents.

I digged up some code we wrote that shows a table of contents. It has nice parameters like:

space-key; The space to get the blog posts from

max-results; The maxium number of blog posts to display

min-age; The minimum age of the blog posts (for example; '30m', '6h', '30d', '10w'. m = minutes, h = hours, d = days, w = weeks)


link-length; The maximum length of the blog post title

labels; A comma separated list of labels, only blog posts with one or more of the labels are displayed

Thanks for the suggestions!

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

889 views 45 7
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