Hi,
I want to display the description of the space on the confluence page and I wrote the following code in user macro
#** ---------------------------------------------------- ----------------------------
PROCESS INPUT
*#
#set($permArray = [])
#if (!$paramSpaceKey)
#set($paramSpaceKey = $space.key)
#end
#set($forspace = $spaceManager.getSpace($paramSpaceKey))
#set($spacename = $forspace.getName())
#set($spacedesc = $forspace.getDescription())
$spacename
$spacedesc
------------------------
But I don't get the description of the space
Note:
I mean the description that appears in :
space Tools->overview->space details ->Description
advice on how to this ?
Thanks
Shoshana Uzan
Found it in the default velocity templates:
$forspace.getDescription().getBodyContent().getBody()
Or with the velocity property shorthands:
$forspace.description.bodyContent.body
Hi @shoshana.uzan ,
based on API https://docs.atlassian.com/ConfluenceServer/javadoc/7.1.0/com/atlassian/confluence/spaces/Space.html getDescription return a SpaceDescription object (https://docs.atlassian.com/ConfluenceServer/javadoc/7.1.0/com/atlassian/confluence/spaces/SpaceDescription.html). Try to use :
#set($spacedesc = $forspace.getDescription().getDisplayTitle())
Fabio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks
But when I try it I get the name of the space and not the description
You have an idea?
ShoshI
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.
Thanks
It seems logical that $forspace.getDescription()) will return the value of the description, but it returns something else that I have no idea what it is...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.