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.
hey @shoshana_uzan , I don't find any method for that in the API
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.