Forum Discussion
Update:
Here's what I've tried, to no avail. A million error messages as a result. I think I'm on the right track though?
<#assign originalTopicSubject = rest("/messages/id/${page.context.message.id}/root.subject").value>
${originalTopicSubject}
Thanks for your help!
Alan
- dhiraj_gophane12 years agoLeader
Hi,
If you want all root messages in community then you can try following API,
http://community.lithium.com/restapi/vc/search/messages?q=is_root:true
If you have message id and if you want the title of root message, then try following API,
http://community.lithium.com/restapi/vc/messages/id/<message_id>?q=is_root:true
Hope this was helpful.
If so please accept it as solution.
- AdamN12 years agoKhoros Oracle
Hi Alan,
I think you're actually really close. Instead of ".../root.subject" try ".../root/subject". For example:
<#assign originalTopicSubject = rest("/messages/id/${page.context.message.id}/root/subject").value>
- iftomkins11 years agoMaven
Adam, thanks for your reply, although I couldn't get it to work. It keeps giving me an odd HTML value when I have that rest call in there:
https://www.dropbox.com/s/uokr53sw1xd250w/Screenshot%202014-02-05%2014.48.10.png
- Alan
- KaelaC11 years agoLithium Alumni (Retired)What's the javascript around this value? If you want to writing out to js rather than html you may need to encode your output. Something like ${originalTopicSubject?html}
Related Content
- 2 years ago
- 4 years ago