Icon
Join thousands of Atlassian users for an unforgettable week of knowledge sharing, product training, networking, and fun. Atlassian Summit is Oct 10 - 13 in San Jose, CA – Register soon before tickets sell out.
Icon
Maintenance Notice: answers.atlassian.com will undergo maintenance on 24 Sep 2016, from 22:00 - 07:00 UTC. During this maintenance window, the service may be intermittently unavailable. See our status page for details.
 
1
0
-1

I am trying to use the subspaces plugin to show a list of subspaces on the home page for a subspace. I have changed the default space content to include {subspaces:key=$spaceKey} but $spaceKey is not recognized in this context. Is there a way I can just configure the space content to list the subspaces of the current space?

    CommentAdd your comment...

    2 answers

    1.  
      3
      2
      1

      You can write a little usermacro :

      Now give it a name and insert the usermacro call to the space content configuration. Works for my CF 4.1

      1. jeff.storey

        Thanks, that seems to be what I'm looking for.

      CommentAdd your comment...
    2.  
      1
      0
      -1

      The $spaceKey is only known within Velocity templates. The default space content is not such a Velocity template. The expression {0} gets replaced with the space key within the default space content[1]. So it should work if you write: {subspaces:key={0}}

      1: http://confluence.atlassian.com/display/DOC/Customising+Default+Space+Content

      1. jeff.storey

        Niels, unfortunately {subspaces:key={0}} will not work since {0} gives the name of the subspace, not the key.

      2. Niels Jaeckel

        Erm, sorry my fault. Please use Sandro's approach. The name for the macro could be "subspaces-currenspace".

      3. jeff.storey

        Will do - thanks for the help.

      CommentAdd your comment...