phoneboy
5 months agoDirector
How do I get the article ID in Freemarker in a TkbArticle?
This is Community Classic.
I'm trying to write a component to display something from a hidden field (canonical_url) while on the page of a TkbArticle.
It doesn't appear that either page.context.message.id or env.context.message.id work in anything Tkb related.
What other options do I have to retrieve this information in the context of the page itself?
phoneboy
We can use the below context object to get the article ID inside the TkbMessage quilt on the TkbArticlePage.
${env.context.message.uniqueId}
For article ID on TkbArticlePage.
${page.context.thread.topicMessage.uniqueId}
For message/comment ID on TkbArticlePage.
${page.context.message.uniqueId}