Document Tree
Document Properties
Last Modified
Added to KB
Public Access
Doc Type
  • ICM 7.10
  • ICM 11



Short Description

creates conditional ISML code

Table of Contents

Product Version


Product To Version


StatusNew Labels


The <ISIF> tag group allows you to create conditional ISML code. <ISIF>, and its supporting tags, <ISELSEIF> and <ISELSE>, will likely be the tags you use most in your templates. These are also called business flow functions because they control the business logic's flow.

Every <ISIF> tag must have a matching </ISIF> tag. <ISIF> uses operators to compare values. For more information about operators, see Reference - ISML Operators. To perform more complex comparisons, you can combine conditions within parentheses using logical operators. You can compare any values accessible through variables, as well as numerical and string constants.

The <ISELSE> and <ISELSEIF> tags are optional. You may use as many <ISELSEIF> tags as needed in an <ISIF> statement, but you can only use one <ISELSE>, which must always be the last comparison performed.


<isif condition = "{ISML expression}">
... some HTML and ISML code ...
<iselseif condition = "{ISML expression}">
... some HTML and ISML code ...
... some HTML and ISML code ...


The example shows some possible conditional entries in a template (with and without using operators):

<isif condition="#hasLoopElements(Basket:ProductLineItems)#">
<isif condition="#isDefined(Error_PasswordConfirmation)#">
<isif condition="#Error_PasswordConfirmation EQ 'MandatoryValueNotAvailable'#">
<isif condition="#(isdefined(ERROR_FormValues)) OR (isdefined(ERROR_User))#">
<isif condition="#(isdefined(ERROR_FormValues) AND isdefined(ConfirmMail)) OR (not(isdefined(ERROR_FormValues)))#">

This example shows how to alternate the colors of the rows in a table. The current color is stored in the user-defined variable, color.

<ISSET name="color" value="#'#00FFFF'#">
    <ISLOOP iterator="basket:product">
      <td bgcolor="#color#">
        <ISPRINT value = "#product:name#">
    <ISIF condition="#color EQ '#00FFFF'#">
      <ISSET name="color" value="#'#00CCFF'#">
      <ISELSEIF condition="#color EQ '#00CCFF'#">
      <ISSET name="color" value="#'#0099FF'#">
      <ISSET name="color" value="#'#00FFFF'#">

The result of a conditional expression must be a Boolean value:

<ISIF condition ="#Products:Price==0#"> Special free gift.
<ISELSEIF condition ="#Products:Price<100#">
Special deal.
Today’s low price.

Reference - ISML Tags

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.
The Intershop Knowledge Portal uses only technically necessary cookies. We do not track visitors or have visitors tracked by 3rd parties. Please find further information on privacy in the Intershop Privacy Policy and Legal Notice.
Knowledge Base
Product Releases
Log on to continue
This Knowledge Base document is reserved for registered customers.
Log on with your Intershop Entra ID to continue.
Write an email to if you experience login issues,
or if you want to register as customer.