Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.3.26-incubating
-
None
-
None
Description
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/
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.
Attachments
Issue Links
- duplicates
-
FREEMARKER-37 ability to skip iteration in a list
- Closed