Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I display the Space Category and the Space Titles on the space pages?

Chris Corcuera October 16, 2011

I would like to display the Space Category (aka Team Labels) on each page of the space.

Is this possible to do using just user macros? Is there a plugin that will display information?

Confluence version 3.5.5

Thanks

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Remo Siegwart
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.
October 28, 2011

Hi Chris

The following user macro would display the team labels of the current space on a page:

## @noparams
#set($containerManagerClass = $content.class.forName('com.atlassian.spring.container.ContainerManager'))
#set($getInstanceMethod = $containerManagerClass.getDeclaredMethod('getInstance',null))
#set($containerManager = $getInstanceMethod.invoke(null,null))
#set($containerContext = $containerManager.containerContext)
#set($spaceLabelManager = $containerContext.getComponent('spaceLabelManager'))
<p>
    Team Labels of space "$space.name": $spaceLabelManager.getTeamLabelsOnSpace($space.key)
</p>

But it would be more elegant to solve this with a plugin.

Hope this helps

Cheers
Remo

TAGS
AUG Leaders

Atlassian Community Events