Forum Discussion

bhakti's avatar
bhakti
Guide
6 years ago

How to get topic id using context object

Hi,

I want topic id of the post on ForumTopicPage using context object.

I want only main topic id not reply id.

 

Thanks,

Bhakti.

  • bhakti - Can you please try this with Unique ID?

    ${page.context.thread.topicMessage.uniqueId}

  • bhakti - You can get the topic id from the following context object:

    ${page.context.thread.topicMessage.uniqueId}

    Thanks!

    • bhakti's avatar
      bhakti
      Guide

      Hi Payal,

      I have already tried this I am getting an error

      The following has evaluated to null or missing:
      ==> page.context.thread.id

      I also tried following things:

      ${page.context.thread.topicMessage.id}
      ${page.context.thread.message.id}

      but I am not getting expected result 

      • Payal's avatar
        Payal
        Director

        bhakti - Can you please try this with Unique ID?

        ${page.context.thread.topicMessage.uniqueId}