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
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,506 views 4 13
Read article

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