freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Dekany (JIRA)" <>
Subject [jira] [Resolved] (FREEMARKER-37) ability to skip iteration in a list
Date Mon, 02 Oct 2017 09:30:01 GMT


Daniel Dekany resolved FREEMARKER-37.
       Resolution: Implemented
    Fix Version/s: 2.3.27-incubating

{{#continue}} is implemented in 2.3.27. I haven't even remembered that this issue was here,
I was acting upon a much older RFE... So now I see the issues I have raised against
it (:, but, since we have {{#break}} with similar problems (like {{#sep}} is not working properly)...
and we still don't have list filtering, I guess it will just remain, and let's hope people
will realize that this two doesn't play nicely with {{#sep}} and {{?odd_item}} and the like.

BTW, until 2.3.27 is released, it's documented here:

> ability to skip iteration in a list
> -----------------------------------
>                 Key: FREEMARKER-37
>                 URL:
>             Project: Apache Freemarker
>          Issue Type: Improvement
>            Reporter: Ivan Levchenko
>             Fix For: 2.3.27-incubating
> Sorely missing ability to skip through an iteration of a list and continue on with the
rest of the list. would like to write clean code like this:
> <#list collection as element>
>         <#if element.attr1 == "some_value"> 
>                 <#continue />  <#-- skip over this item and run next item in
loop -->
>         </#if>
>     do stuff here
> </#list>
> Thanks!

This message was sent by Atlassian JIRA

View raw message