Forum Discussion

srinivaskiranp's avatar
7 years ago

how to use ${coreNode.settings.name.name_last}

Hi 

In the the below code snippet is a freemarker context object in that what is the name_last means ?.

How can i use coreNode.settings to get the settings of a specific category node,blog node, board node etc. 

code snippnet : ${coreNode.settings.name.name_last} 

 

Thanks

Kiran

  • luk's avatar
    luk
    7 years ago

    As Parshant wrote, you use the call:

    http://community.lithium.com/<communityid>/restapi/vc/settings/name/name_last/set?value=<yourvalue>

    but notice the ?value=yourvalue part that was missing in his post, that's how you pass the value...

    and of course you have to adapt the API path to reflect the node where you want to set the setting value, the above call will set it on community level, if you want it for a category for example, you would do:

    http://community.lithium.com/<communityid>/restapi/vc/categories/id/<categoryid>/settings/name/name_last/set?value=<yourvalue>
  • srinivaskiranp,

    Firstly you need to set these settings in your profile using API V1

     

    http://community.lithium.com/community-name/restapi/vc/settings/name/name_last/set

    After only then you can get the value using below context-object

    ${coreNode.settings.name.name_last} 

     

    • srinivaskiranp's avatar
      srinivaskiranp
      Guide

      Hi Prashant,

        You said i need to set the settings in my profile for using API V1, can you suggest me how can i do it.

       

      thanks

      regards

      kiran.p

      • luk's avatar
        luk
        Boss

        As Parshant wrote, you use the call:

        http://community.lithium.com/<communityid>/restapi/vc/settings/name/name_last/set?value=<yourvalue>

        but notice the ?value=yourvalue part that was missing in his post, that's how you pass the value...

        and of course you have to adapt the API path to reflect the node where you want to set the setting value, the above call will set it on community level, if you want it for a category for example, you would do:

        http://community.lithium.com/<communityid>/restapi/vc/categories/id/<categoryid>/settings/name/name_last/set?value=<yourvalue>
    • srinivaskiranp's avatar
      srinivaskiranp
      Guide

      Hi

      Firstly you need to set these settings in your profile using API V1 

      how can i do it.

      thanks

      srinivas kiran.p