Can you use a variable with include-page macro?

I have a page that I need to render inside the parent page. The parent page is created with a template, so I won't know the exact name of the child page until it is created. Is it possible to do something like this:

{include-page:title=%pagetitle% Color}

So, if you are on page 'Apple' the page you are rendering inside 'Apple' would be 'Apple Color.'

4 answers

I think there are a few ways of doing this either using the reporting plugin or the Confluence Run Plugin with the run-now macro and the $page_title pre-defined variable.

{run-now}{include:$page_title Color}{run-now}

How can I do it with the run-macro in a template? When the page is named 'Apple', this works in the template:


This works as well, somewhere in my template:


But this doesn't work:


If you have the Reporting plugin then you can use injection and the %...% syntax you suggested in your post. Something like this should work (untested) : {report-on:injection=true}{include-page:%page:parent > page:name% Colour}{report-on}

I have the idea this doens't work anymore with Confluence 5. 

(it does with unmigrated wiki-markup).

Anybody know what changed?

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

292 views 11 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