PAULEM
6 years agoAdvisor
env.context.message.uniqueId returns null
Hi I have a script on my ForumTopicPage that captures the id of the original post. I have used this: <#assign msg_id = env.context.message.uniqueId />
<#assign msgQuery = "SELECT * FROM messages ...
- 6 years ago
There are two ways to get the messages id from context object.
Your condition would be like below code.
<#if env.context.message?? > <#assign msg_id = env.context.message.uniqueId /> <#else> <#assign msg_id = page.context.message.uniqueId /> </#if>
You can get the ID of the currently rendered message
${page.context.message.id}
${env.context.message.id}You can get the unique ID of the currently rendered message
${page.context.message.uniqueId}
${env.context.message.uniqueId}