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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,100
Community Members
 
Community Events
184
Community Groups

get space description with a user macro

Edited

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

 

1 answer

0 votes
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 24, 2023

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

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 24, 2023

hey @shoshana_uzan , I don't find any method for that in the API

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...

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events