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

Put a /create from template button on a template

Micheal Planck January 21, 2021

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

1 vote
kioobee March 3, 2021

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. 

Micheal Planck March 8, 2021

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
AUG Leaders

Atlassian Community Events