Using templates and macros based on page name?

So here's my use case, wondering if this can be done?

I want to build a number of pages for an event, each page will be for competitions within that event, so pages will be called kickball, softball, etc.

Blogs will be created as recaps for these events, and labeled appropriately so the content can be aggregated into a main feed on the event homepage, but also onto the pages for the individual events.

So my question is, can I build a template, and have the blog list macro use the name of the page for the label it is constrained to? So a page about Kickball would then have a blog roll of kickball labeled posts, etc.

It's a few dozen events, relativelly trivial work to make them all, but can see this being useful in other applications so I thought I would ask and it could make a interesting use case for some documentation I'm building for our end users.

Loosely related, can you list blog posts by space category? Sounds like maybe a job for the reporting plugin maybe?


1 answer

1 accepted

0 votes
Accepted answer


The Blog post macro is able to aggregate on space, labels or authors. You can specify a time frame that this macro will pull in new blogs.

We have the following document that goes into detail on the use of this macro.

Please take a moment to review it and let us know if you have any other questions.

Yeah, default functionality is too broad for this particular use case. Was hoping to trip over an unrealized tokenized feature or something, so you could build a template that have context beyond just the space level. Or perhaps some pointers with the reporting plugin that might accomplish the same thing and leverage the name of the page in this use case to populate content.

So as it is, if I have to make 50 pages with this macro, i'll just need to edit the labels used in the macros to reflect the event they are to catalog/track.

To the best of my knowledge yes. There is no way that I know how to get the blog macro to pull a variable out of a page template. You will need to create the pages by hand and alter the blog macro to aggregate the label you desire.

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 ...

1,015 views 51 8
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