- ⌂ Flow Control
Execute and repeat a block of cTemplate if a condition as long as the condition is true at the before it is executed each iteration.
#WHILE(condition) ... #ENDWHILE
- condition - A cTemplate expression and/or cScript expression that determines if the block should executed (TRUE) or terminate (FALSE)
#ASSIGN($i, 1) #WHILE($i<=3) Iteration $i<br/> #ASSIGN($i, $i+1) #ENDWHILE
Iteration 1 Iteration 2 Iteration 3