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
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}
- iftomkins11 years agoMaven
Here is the code that is in the Desktop Hitbox area:
<#if page.name?lower_case == "forumtopicpage" >
<#assign originalTopicSubject = rest("/messages/id/${page.context.message.id}/root/subject").value>
var topicTitle = '${originalTopicSubject}';
jQuery(".lia-message-subject-banner").each(function(){
jQuery(this).text(topicTitle);
});
</#if>And here is the freemarker error response (made some adjustments since last time):
https://www.dropbox.com/s/59dehi42ngfvx33/Screenshot%202014-02-05%2016.08.57.png
thanks so much!
Related Content
- 2 years ago
- 4 years ago