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

Macro space key look to currrent space

Erik Nov 05, 2014

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

2 votes
Jonathan Simonoff Nov 05, 2014

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 Leader Nov 05, 2014

That is what I was going to say. :)

Erik Nov 05, 2014

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

Davin Studer Community Leader Nov 05, 2014

Which macro is it?

Tanya Dixon May 04, 2017

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

0 votes
Jonathan Simonoff Nov 05, 2014

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

Erik Nov 05, 2014

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
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Confluence

Confluence CVEs and common questions

Two vulnerabilities have been published for Confluence Server and Data Center recently: March 20, 2019 CVE-2019-3395 / CVE-2019-3396 April 17, 2019 CVE-2019-3398 The goal of this article is...

948 views 0 19
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