[
https://issues.apache.org/jira/browse/FREEMARKER-79?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ondra Žižka closed FREEMARKER-79.
---------------------------------
Resolution: Duplicate
Actually this is covered by FREEMARKER-37, I just didn't see <#continue> in the
title.
> Introduce <#continue> to skip an item within <#list>
> ----------------------------------------------------
>
> Key: FREEMARKER-79
> URL: https://issues.apache.org/jira/browse/FREEMARKER-79
> Project: Apache Freemarker
> Issue Type: New Feature
> Components: engine
> Affects Versions: 2.3.26-incubating
> Reporter: Ondra Žižka
>
> Freemarker has {{<#break>}} but no {{<#continue>}} to skip items in a
> {{<#list>}}.
> It has been considered few times, but seems it's not here in Apache Jira, so
> I'm adding it.
> Copying the reasoning from old FM feature request
> [https://sourceforge.net/p/freemarker/feature-requests/79/]
> {quote}
> In Freemarker you can use break directive to exit from a list loop: actually
> I would need a "continue" directive to go to the next item if some condition
> is verified.
> EG:
> <#assign seq = ["winter", "spring", "summer", "autumn"]>
> <#list seq as x>
> <#if x = "spring"><#continue></#if>
> ${x}
> </#list>
> This will simply not print spring skipping directly to next item.
> {quote}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)