AnsweredAssumed Answered

webscript for free marker template

Question asked by raghu462 on Apr 19, 2010
Latest reply on Apr 21, 2010 by ssaravanan
how can i develop web script for following ftl?

<#macro recurse_macro node depth>
  <#if node.isContainer>
    <tr>
   <td>
      ${node.properties.name}
   </td>
<td></td>
  </tr>

   <#list node.children as child>
   <#if child.isContainer>

       <@recurse_macro node=child depth=depth+1/>

<#list child.children as child2>
    <#if child2.isDocument>
    <tr><td></td><td>${child2.properties.name}</td></tr>
       </#if>
</#list>

   </#if>
   </#list>
  </#if>
</#macro>

<b>Recursive Listing of Spaces & Documents:</b>
<table border="1" celpadding="1" cellspacing="1">
<tr><th> Space </th><th> Document </th></tr>
<@recurse_macro node=companyhome depth=0/>
</table>

Outcomes