ISML
B2C Commerce ISML tags are extensions of the tag-based language conforming to SGML standards. They are commands inserted into a document that determine how B2C Commerce embeds live data into a page, and how to format this data together with the regular HTML code.
Each B2C Commerce tag has a specific name that always
starts with the prefix "is," such as <isprint>
or
<isset>
. Tags must be included within "< >",
and can have several attributes that can be set to control the behavior of
the tag. All tags and their attribute names are not case sensitive.
However, the values of attributes are often case sensitive.
The syntax shows literal values in quotes and variables without quotes. Unless otherwise noted, each attribute is included exactly once. You can only use expressions or strings as documented. Using expressions if they are not explicitly allowed causes exceptions.
Tag | Syntax | Purpose | Location | Notes |
---|---|---|---|---|
<isactivedatacontext> |
|
Active Data Collects category context from a page for active data. |
HEAD BODY Can be placed anywhere that script tags are valid. Should only be in one template used to render a page. |
|
<isactivedatahead> |
|
Active Data Allows collection of active data from pages with a <head> tag. |
HEAD | |
<isanalyticsoff> |
|
Analytics Disables analytics for single pages. |
HEAD BODY Can be placed anywhere that script tags are valid. |
|
<isbuynow> |
|
Commerce Cloud Payments Injects <script> to render express checkout buttons that lets a shopper buy a specific product. |
BODY Can be placed anywhere script tags are valid. |
|
<isbreak> |
|
Flow control Terminating loops |
BODY | Only used inside <isloop>...</isloop> |
<iscache> |
|
Caching Caching storefront pages |
Can be placed anywhere in the template. However, as a best practice, Commerce Cloud recommends that caching statements are placed at the beginning of a template. |
The tag can be located anywhere in the template. If the tag occurs several times in one template, the one set to cache off or the one with the shortest cache time is used as the cache setting for the resulting page. |
<iscomment> |
|
Comments Adding documentation for templates |
Can be placed anywhere in the template. Using <iscomment> is preferable to using HTML comments, especially for sensitive information, because the tag is removed automatically by B2C Commerce on rendered pages. | As a best practice, include an initial comment that describes the purpose, the requirements and the effect of a template from both a business point of view and a technical perspective. |
<iscomponent> |
|
Include Including the output of a pipeline in the page |
Can be placed anywhere in the template. | |
<iscontent> |
|
HTTP Define the MIME type of the output document |
Before the HTML DOCTYPE declaration. To make
sure all characters in a document are correctly encoded, the
|
Don't specify <iscontent> if it isn't needed. The
default for pipeline responses text/html, UTF-Β]8, and
compact="false". Note: The default for emails when using the
SendMail pipelet is text/plain.
|
<iscontinue> |
|
Flow control Jump to the beginning of the loop |
BODY | Only used inside <isloop>...</isloop> |
<iscookie> |
|
HTTP Setting cookies in your system |
Can be placed anywhere in the template. | |
<isdecorate> |
|
Decoration Template decoration mechanism |
Must wrap all content to be decorated. | For <isdecorate> to render a page, the content it wraps must contain an <isreplace/> tag. |
<iselse> |
|
Flow control Specifying what happens if a condition doesn't evaluate to true |
Can be placed anywhere in the template. | Must be used with <ifelse>. |
<isif> |
|
Flow control Creating conditional template code |
Can be placed anywhere in the template. | |
<iselseif> |
|
Flow control Specifying a subcondition
off an |
Can be placed anywhere in the template. | |
<isinclude> |
|
Include Including the contents of one template inside another |
Can be placed anywhere in the template. However, as a best practice, add includes that affect the whole page to the top of the template. |
|
<isloop> |
|
Flow control Creating loops |
Can be placed anywhere in the template. | See also isbreak, iscontinue, and isnext. |
<ismodule> |
|
Include Declaring custom tags |
Can be placed anywhere in the template. | In SiteGenesis, all <ismodules> are declared in one file: util/modules.isml. |
<isnext> |
|
Flow control Jumping forward within a loop |
Can be placed anywhere in the template. | Only used inside <isloop>...</isloop> |
<isobject> |
|
Active Data Collects page impressions or views from the storefront. |
Must wrap any object you want to record active data for. | Must pass an object of type βProductHitβ. |
<ispayment> |
|
Commerce Cloud Payments Injects <script> to render express checkout buttons that lets a shopper pay for items in the current basket. |
BODY Can be placed anywhere script tags are valid. |
|
<isprint> |
|
Output Formatting and encoding output strings |
BODY | |
<isredirect> |
|
HTTP Redirecting browsers to specific URLs |
Before the HTML DOCTYPE declaration. | |
<isremove> |
|
Variables Removing user-defined variables |
Can be placed anywhere in the template. | |
<isreplace> |
|
Decoration Part of the decorator mechanism; insert content to be decorated |
Must be within <isdecorate> tags. If a template is going to be remotely included, the <isdecorate> tags can be in the including template. | |
<isscript> |
|
Scripting Creating scripts within templates |
HEAD BODY Can be placed anywhere that script tags are valid. |
|
<isselect> |
|
Forms Enhancements to the HTML<select> tag |
Can be placed anywhere in the template. | |
<isset> |
|
Variables Setting user-defined variables |
Can be placed anywhere in the template. | |
<isslot> |
|
Output Define slots for content display |
BODY Usually within <isdecorate> tags. |
|
<isstatus> |
|
HTTP Define status codes |
Can be placed anywhere in the template. |