[ 
https://issues.apache.org/jira/browse/FREEMARKER-37?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16008224#comment-16008224
 ] 

Vojtech Knyttl edited comment on FREEMARKER-37 at 5/12/17 2:40 PM:
-------------------------------------------------------------------

Well it would be great if this could just be some kind of syntactic sugar, so 
this:

{code:xml}
<#if conditionToSkip> 
    <#continue
</#if>
<execute>
{code}

Could be just syntactic sugar for:

{code:xml}
<#if conditionToSkip> 
<#else>
    <execute>    
</#if>
{code}


was (Author: knyttl):
Well it would be great if this could just be some kind of syntactic sugar, so 
this:

```
<#if conditionToSkip> 
    <#continue
</#if>
<execute>
```

Could be just syntactic sugar for:

```
<#if conditionToSkip> 
<#else>
    <execute>    
</#if>
```


> ability to skip iteration in a list
> -----------------------------------
>
>                 Key: FREEMARKER-37
>                 URL: https://issues.apache.org/jira/browse/FREEMARKER-37
>             Project: Apache Freemarker
>          Issue Type: Improvement
>            Reporter: Ivan Levchenko
>
> 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
(v6.3.15#6346)

Reply via email to