Discussion:
[FreeMarker-user] how to skip an item in a list
S Ahmed
2012-08-05 16:42:21 UTC
Permalink
If I am looping through items, how can I do a 'continue' like:

<#list options as option>

if option.name == "abc"
continue

</#list>

Is this possible?
Denis Bredelet
2012-08-05 17:13:23 UTC
Permalink
Post by S Ahmed
<#list options as option>
if option.name == "abc"
continue
</#list>
Is this possible?
No.

Can you put the filtering in the list options itself?

Otherwise simply use:

<#if option.name != "abc">
use option here

</#if>

-- Denis.

Loading...