You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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
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
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.