The following freemarker code causes an exception
<#assign i= it.getList().size()>
<#list it.getList() as elem>
<#if i==1>
<li>${elem.name}</li>
<#else>
<li class="marked">${elem.name}</li>
</#if>
<#assign i = i-1>
</#list>
The following exception is thrown:
Expected hash. it.getList() evaluated instead to freemarker.template.SimpleSequence
Anyone knows why? How can i assign the length of the list to my variable i
?