confluence: show spacekey

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

This widget could not be displayed.

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

wow it works, thanks!!!

i created my first user macro :)

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

Glad to hear that :)

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

This widget could not be displayed.

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

This widget could not be displayed.
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.

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?

This widget could not be displayed.

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

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

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

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...

530 views 7 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