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="${}"> <BR>
  <isif condition="${status.counter >= 3}">
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.