Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Macro space key look to currrent space

Erik November 5, 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
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 5, 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
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 5, 2014

That is what I was going to say. :)

Erik November 5, 2014

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

Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 5, 2014

Which macro is it?

Tanya_Dixon
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 4, 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
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 5, 2014

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

Erik November 5, 2014

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

Like Amy Forbes-Richardson likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events