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

This widget could not be displayed.

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!! :-)

This widget could not be displayed.

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 Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

466 views 6 6
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