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

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

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.

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.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

551 views 20 11
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