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
Posted Monday in Confluence

Organizing your space just got easier - Page Tree Drag & Drop is here

Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...

118 views 3 4
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