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

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

https://www.adaptavist.com/display/Builder/blog-calendar+macro

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)

max-age;

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

910 views 23 12
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