how to skip an item in a list

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how to skip an item in a list

graild
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?

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
FreeMarker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-user
Reply | Threaded
Open this post in threaded view
|

Re: how to skip an item in a list

Denis Bredelet

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?

No.

Can you put the filtering in the list options itself?

Otherwise simply use:

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

</#if>

-- Denis.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
FreeMarker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-user