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?

Thanks!

1 answer

1 accepted

Stephen,

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.

https://confluence.atlassian.com/display/DOC/Blog+Posts+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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,694 views 26 10
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