Control flow

if, else, loop, with, iterate, while, abort, return, loop_abort, and loop_continue control execution.

Target guide

Control blocks are often used directly inside templates. Keep block delimiters balanced across code and literal output.

Examples

Working pattern

1[with item in array('a', 'b') do => {]2<li>[#item]</li>3[}]
Use this as a focused starting point and adapt it in context.

Related