Specification: isbreak

isbreak Element

Terminate loops unconditionally.




<isbreak> can be used within a loop (defined by an <isloop> tag) to terminate a loop unconditionally. For more information on creating loops see <isloop>. If <isbreak> is used in a nested loop, it terminates only the inner loop.


In this example, <isbreak/> terminates the loop after showing three product names; even if the products iterator contains more than three products.

<isset name="counter" value="${0}">
<isloop iterator="${pdict.Basket.product}" var="product" status="status">
  <isprint value="${product.name}"> <br/>
  <isif condition="${status.counter >= 3}">