AnsweredAssumed Answered

I want to get the full path of A category node .

Question asked by nyszhangyong on Jun 28, 2012
Latest reply on Jun 29, 2012 by nyszhangyong
hello

I want to get the full path of A category node .
For example : Categories/Regions/OCEANIA/Polynesia/A


Please help me modify the "testCategoriesQuery.get.json.ftl", let me get the full path to the A category  node .

testCategoriesQuery.get.js
 
if (node.hasAspect('cm:generalclassifiable')){
                nodeCategories=node.properties["cm:categories"];
}


testCategoriesQuery.get.json.ftl

<#escape x as jsonUtils.encodeJSONString(x)>
{
   "catnodes  ":
   [
      <#list catnodes  as catnode>
      {
         "id": "${catnode.id}",
         "name": "${catnode.name}",
         "nodeRef": "${catnode.nodeRef}"
      }<#if catnode_has_next>,</#if>
      </#list>
   ]
}
</#escape>

Outcomes