Hi Catherine -
To get the id of the current thread (which is equal to the id of the root message)
${page.context.thread.topicMessage.id}
This variable is only available on pages with a thread so you must first check for the page name or only put this call in component added to message pages. Those pages are:
- BlogArticlePage
- ContestSubmissionPage
- ForumTopicPage
- IdeaPage
Another thing to keep in mind is that an article can have multiple labels so you should be prepared to deal with looping through a number of labels.
Hope that helps.