Apache Velocity foreach loop #continue

Premier picture Premier · Sep 23, 2011 · Viewed 10k times · Source

Is there a #continue command for jump to next iteration in foreach loop?

Answer

Mike K. picture Mike K. · Sep 23, 2011

I have a bunch of velocity code but I don't think I've ever seen this. I believe you have to use a #foreach and then use and #if to check your skip condition within the loop. The VTL guide doesn't seem have a better approach.