confluence: show spacekey

red sonja August 25, 2013

I would need just to show the spacekey within the space homepage. (we use confluence 5.1)

I know that there's a space information macro, but this is too much.

Is there any possibility to have a text like this "spacekey: ..." ?

this would be VERY helpful - thx!!

4 answers

2 votes
Amalia
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.
August 28, 2013

You can create a user macro and add the following:

## @noparams
$space.key

This will show the space key.

Alternatively, you can use JavaScript:

AJS.params.spaceKey

which will return the spacekey

red sonja August 28, 2013

wow it works, thanks!!!

i created my first user macro :)

but could I maybe add options like show the spacekey of the parent space?

Amalia
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.
August 28, 2013

Glad to hear that :)

The concept of "parent space" is not available in Confluence. Are you using a third-party plugin?

0 votes
red sonja November 4, 2013

no, i'm using the subspaces macro and therfore have 'parent'-spaces.

(sorry for the late answer - i got a baby in the meantime ;) )

Dogan Can April 13, 2014

Hi, did you solve the problem? Can you get the spacekey of parent space?

0 votes
red sonja August 25, 2013
i would really only need the spacekey (ideally to be shown on any page). because there are some macros, eg the subspaces macro that needs the spacekey instead of the space name and its quite annoying being in the edit mode and then having to get out again, check the spacetools and so on just to get to know the spacekey. it would be cool if there was a macro named "show spacekey" with the parameter "space" that in the end looks like 'spacekey: xyz' then i could use it on any page for any space. for example: we have the subspaces macro to show the children and on other occasion show spaces of the same hierarchical order. so we sometimes need the spacekey of another space too.
Daniel Borcherding
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.
August 26, 2013

If this was a macro and you were editing the page wouldn't it just revert to being a box?

Can you just take note of the Key in the URL paramater before you go into edit mode?

0 votes
RianA
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.
August 25, 2013

Do you want the content of the Home page to only show the space key? Or is it the URL address?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events