The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

{add-page} - Easy way to have this automatically insert the page link where this was pressed?

Nick Yarsulik
August 4, 2011

I have an "add-page" link that opens up a page template I created. This creates the child page and attaches it to its parent correctly.

I am wondering if it is possible to have this link also replace itself (or add just below itself) the new link to the new child page right where this link was pressed.

Is this possible?

Thanks!

Nick

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Nick Yarsulik
August 5, 2011

I was able to get around this issue by using the "content by label" macro and then simply applying the targeted label within the "add-page" macro.

0 votes
David Peterson
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 Champions.
August 5, 2011

If the page will have a fixed name, you can use the {link-page} macro instead, and provide the name. That name can be built based on the parent page also if you like, using 'injection'. For example, if you have a parent page called 'Foo' and you want to add a child called 'Foo - Bar', you could do this:

{link-page:%page:title% - Bar|template=Bar Template|live=true}Bar{link-page}

When 'Foo - Bar' doesn't exist, it will be a 'create page' link, and when it does, it will link to the page instead.

TAGS
AUG Leaders

Atlassian Community Events