iscontinue Element

Syntax

<iscontinue/>

Purpose

Stops processing the current item in the loop and starts the next item in loop. The <iscontinue> tag differs from the <isnext> tag in that isnext just moves the iterator forward one and continues processing next line of code. <iscontinue> breaks out of the processing and then moves to top of loop to start processing again, if there are other items to process.

<iscontinue/> can be used only within an <isloop>... </isloop> loop structure. It's similar to "continue" in Java.

Example

The following SiteGenesis example shows how to use <iscontinue/> to filter out the Gift Certificate payment method that is used later in the checkout process:

		<div class="payment-method-options">
			<isloop items="${pdict.CurrentForms.billing.paymentMethods.selectedPaymentMethodID.options}" var="paymentMethodType">
			
				<iscomment>Ignore GIFT_CERTIFICATE method, GCs are handled separately before other payment methods.</iscomment>
				<isif condition="${paymentMethodType.value.equals(dw.order.PaymentInstrument.METHOD_GIFT_CERTIFICATE)}"><iscontinue/></isif>
				
				<div class="form-row">
					<isset name="radioID" value="${paymentMethodType.value}" scope="page"/>
					<label for="is-${radioID}"><isprint value="${Resource.msg(paymentMethodType.label,'forms',null)}"/>:</label>
					
					<isif condition="${paymentMethodType.checked || (!empty(pdict.selectedPaymentID) && paymentMethodType.htmlValue == pdict.selectedPaymentID)}">
						<input type="radio" checked="checked" class="input-radio" name="${pdict.CurrentForms.billing.paymentMethods.selectedPaymentMethodID.htmlName}" value="${paymentMethodType.htmlValue}" id="is-${radioID}" />
					<iselse>
						<input type="radio" class="input-radio" name="${pdict.CurrentForms.billing.paymentMethods.selectedPaymentMethodID.htmlName}" value="${paymentMethodType.htmlValue}" id="is-${radioID}" />
					</isif>
				</div>
				
			</isloop>
		</div>