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?
Community moderators have prevented the ability to post new answers.
You can write a little usermacro :
## @noparams #set($globalHelper=$action.getHelper()) $globalHelper.renderConfluenceMacro(" {subspaces:key=$content.spaceKey}")
Now give it a name and insert the usermacro call to the space content configuration. Works for my CF 4.1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Niels, unfortunately {subspaces:key={0}} will not work since {0} gives the name of the subspace, not the key.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Erm, sorry my fault. Please use Sandro's approach. The name for the macro could be "subspaces-currenspace".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.