Macro space key look to currrent space

When copying a page across a space, or copying spaces. Many of the Confluence Macros have a field in them called 'Space Key' that will always reference it's originating space. It would be nice if this key could have a field option of 'Use Current Space' or something like that.

Example Macro where this becomes an issue - Create from Template

Every time a page is copied that has this macro, it must be updated to include the new space to ensure new pages are placed under the correct space

Is there anyway to make this happen?

2 answers

Another approach would be to wrap this with a user macro that gets the current space key and writes and executes the macro.

Davin Studer Community Champion Nov 05, 2014

That is what I was going to say. :)

I'll have to see if I can't get someone to help me make that happen

Davin Studer Community Champion Nov 05, 2014

Which macro is it?

I needed to find the Space Key for my personal page. I looked at the source code for my page and saw that it was ~[myname].

When I put that in the space key for the macro it worked!! :-)

With some macros, you can use @self.  With others, if you leave the key field blank it defaults to the current space.

The field is required, and @self creates: Error rendering macro 'create-from-template' : No space found with space key: @self

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 11, 2018 in Confluence

What are your project planning tips?

Hello Community,  Jessica here from the Confluence product marketing team! Today I wanted to get your takes on project planning –– what works, what doesn’t, how do you know if you’re doing it r...

261 views 1 4
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