How to have many similar looking pages with dynamic variables?

Róbert Harkai
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 7, 2018

Hey!

 

Problem

I'd like to create many similar looking Confluence pages with certain JIRA macros. The only difference being is the different pages would have different "label" criteria in their JIRA macro's JQL query.

Approach

We already implemented the JQL Filter Allowing Variables macro, and another one which is resolving the page title.

My idea was to make a template page which contains in an Excerpt macro block all the JQL FAV macros that I want with the "Page Title" macro inside their body as the variable for the label. This resolves nicely on itself, but when I Excerpt include this page into a different page, the "Page Title" still resolves to the name of the template page.

 

The labels won't change in the long run, but I would like the pages to be extendable, thus currently I don't see the Confluence Template variables.

 

How would you solve this?

Currently I only see the Excerpt as an option, but I don't know how to "inject" information into the included content

Thanks in advance!

1 answer

0 votes
Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 7, 2018

I was thinking about something similar (I think) regarding having variables with the mutliexcept macro, so that I could have the same description appear multiple places, but replace the product name as appropriate.

My thinking on how to solve this (short asking the vendor to implement, or provide access to the source code -- low percentage), was to create a user macro that wraps the multiexcerpt include. The user macro would render the content of the multiexcerpt to an object, look for the variable name in the source, and replace it with the variable, and then render object on the page.

Hopefully, this will get you started.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events