Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Automacally insert the parent page title in the body of an article using templates

nferraroc July 31, 2014

I'm creating a template and would like to have the parent page title automatically inserted into the body of the page. I do not want the information to change if the document is moved. Is there a way to do this?

6 answers

0 votes
nferraroc August 17, 2014

I found a solution with Create Page Macro that will take the title of the parent page and make them into labels on the newley created page. It was exactly what I needed. Here is the link.... https://marketplace.atlassian.com/plugins/com.adaptavist.confluence.createpage#support

0 votes
Robert Reiner _smartics_
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.
August 1, 2014

I'd like to suggest to check the blueprint context (the way as Yagnesh Bhat described) for a property named 'parentPageId' (maybe this is not available in all versions - I just happend to see it in my environment - I cannot refer to docs). Use this to fetch the page from the PageManager and set the value you require to the context.

0 votes
Yagnesh Bhat
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.
August 1, 2014

What you can try doing is :

1) set a placeholder for the pagetitle in the template

2) From the blueprint context provider, pass the hardcoded value of the parent page to the template's placeholder.

I dont think there is a way to get the parent of the page thats not already created, but what you can do with blueprint is explicitly set the parent page of the documents rendered by the blueprint.

0 votes
Alexey_Rjeutski__Polontech_
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.
August 1, 2014

Please look into https://confluence.atlassian.com/display/DOC/Create+from+Template+Macro- it can be at least workaround for your issue.

0 votes
nferraroc August 1, 2014

The page being created is a child page to the parent. The parent page has already been created and I want that title to be copied into the body of the child page.

0 votes
Alexey_Rjeutski__Polontech_
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.
July 31, 2014
As I remember (cannot check confluence right now) the title is empty when you are creating new page, isn't it? If so, how would that work in theory?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events