Find Questions…

Close ×
First time here? Check out the FAQ!

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

Chris_cleary asked this question · 1 karma ·

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

216 views

One Answer:

Remo Siegwart · 6,739 karma ·

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

Looking for something else?

Find Questions…

or Browse other questions tagged:

or Ask a Question