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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Put a /create from template button on a template

So: I have a page template. It includes a /create from template button to add child pages.

(Note that to create such a button, you have to make it on a regular page, and then paste it into your template, since you cannot edit the Template field of a /create from template macro when on a template.)

Here is the problem: when you create the page from a template, its button to create its own children points to the space the button was created in when you first made it and pasted it to the template.

Although the supporting text says the default is to use the current space, you cannot leave the space field blank. It must have a valid space key. And since the space you will be using when you create the template doesn't exist, you can't enter that new space key.

Wait, it gets worse.

Once you create the page from the template, if you enter edit mode on that page and edit the button, it magically replaces the space key with the current space. You cannot even see the old, inappropriate key. If you now click Save, having changed nothing, and then Publish, the button will work as expected: it will now create children in the current space.

So: I can give my users a helpful template that creates a page with a button that will then create child pages. They just have to edit every button by hand, at least once, while changing nothing.

Obviously the intent was for a /create macro to update itself to the current space. We know this because that is what it does when you try to edit it. However, it does not do that until you try to edit it.

Does anyone know a trick to convincing all of the macros on a newly created page to update themselves properly?

1 answer

I have the exact same problem ! Using those macros is a handy way of filling up a space with pages in a predefined, standard way.... Having the ability to either leave the space key field empty or use the @currentSpace keyword would resolve this issue. 

It seems obvious that is how it is supposed to work. So this isn't one of Atlassian's bizarre notions of work flow; it's just a bug.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Confluence

Confluence Mythbusters: Does Atlassian even use Confluence?

Hi, Confluence collaborators! As part of #Confluence-Collaboratory month, we’ve created a very special Mythsbusters segment, where we're dive into an interesting myth and uncover the truth behind i...

1,387 views 7 29
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you