I tried the code:
<#assign ResetCountTemplateSource="<#assign count${a} = 0 />" >
<#assign ResetCountTemplate=ResetCountTemplateSource?interpret >
<#list 0..depthOfList as a>
<@ResetCount />
</#list>
but couldn't get it to work so i tried the example on the freemarker documentation
<#assign x=["a", "b", "c"]>
<#assign templateSource = "<#list x as y>${y}</#list>">
<#assign inlineTemplate = templateSource?interpret>
<@inlineTemplate>def</@inlineTemplate>
http://freemarker.sourceforge.net/docs/ref_builtins_expert.html
And this doesn't work either, it says y is undefined.
Any ideas? I appreciate your help.
Liam
[originally posted on jforum.net by liam]