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 angle brackets (< and >), 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.

Salesforce recommends that you use lower-case as good programming practice.

The syntax shows literal values in quotes and variables without quotes. Unless otherwise noted, each attribute is included exactly one time. You can only use expressions or strings as documented. Using expressions if they are not explicitly allowed causes exceptions.

Tag & LocationSyntax & Notes

<isactivedatacontext>

Allowed locations:

  • <head>
  • <body>
  • Anywhere that script tags are valid.

Collects category context from a page for active data.

Should only be in one template used to render a page.

<isactivedatahead>

Allowed location:

  • <head>

Allows collection of active data from pages with a <head> tag.

<isanalyticsoff>

Allowed locations:

  • <head>
  • <body>
  • Anywhere that script tags are valid.

Disables analytics for single pages.

<isbuynow>

Allowed locations:

  • <body>
  • Anywhere that script tags are valid.

Injects <script> to render express checkout buttons that lets a shopper buy a specific product.

<isbreak>

Allowed locations:

  • <body>

Only used inside <isloop> for terminating loops.

<iscache>

Allowed location:

  • Anywhere in the template

Cache a page.

The tag can be located anywhere in the template. However, we recommend that caching statements are placed at the beginning of a 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>

Allowed location:

  • Anywhere in the template

Add documentation to the template.

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.

Using <iscomment> is preferable to using HTML comments, especially for sensitive information, because the tag is removed automatically by B2C Commerce on rendered pages.

<iscomponent>

Allowed location:

  • Anywhere in the template

Include the output of a pipeline in the page.

<iscontent>

Allowed location:

  • Before the DOCTYPE declaration

Define the MIME type of the output document.

Don't specify <iscontent> if it isn't needed. The default for pipeline responses is text/html, UTF-8, and compact="false".

The default for emails when using the SendMail pipelet is text/plain.

To make sure all characters in a document are correctly encoded, the <iscontent/> tag should always be first in an ISML template.

<iscontinue>

Allowed location:

  • <body>

Jump to the beginning of the loop.

Only used inside <isloop>.

<iscookie>

Allowed location:

  • Anywhere in the template

Set a cookie.

<isdecorate>

Allowed location:

  • Must wrap all content to be decorated.

Template decoration mechanism.

For <isdecorate> to render a page, the content it wraps must contain an <isreplace/> tag.

<iselse>

Allowed location:

  • Anywhere in the template

Specify what happens if a condition doesn't evaluate to true.

Must be used with <ifelse>.

<isif>

Allowed location:

  • Anywhere in the template

Create conditional template code.

<iselseif>

Allowed location:

  • Anywhere in the template

Specify a subcondition for an <isif> tag in a loop.

<isinclude>

Allowed location:

  • Anywhere in the template

Includes the contents of one template inside another.

As a best practice, add includes that affect the whole page to the top of the template.

<isloop>

Allowed location:

  • Anywhere in the template

Creates a loop.

See also <isbreak>, <iscontinue>, and <isnext>.

<ismodule>

Allowed location:

  • Anywhere in the template

Declares custom tags.

In SiteGenesis, all <ismodules> are declared in one file: util/modules.isml.

<isnext>

Allowed location:

  • Anywhere in the template

Jump forward within a loop.

Only used inside <isloop>.

<isobject>

Collects page impressions or views from the storefront.

Must pass an object of type ProductHit.

Must wrap any object you want to record active data for.

<ispayment>

Allowed locations:

  • <body>
  • Anywhere that script tags are valid

Injects <script> to render express checkout buttons that lets a shopper pay for items in the current basket.

<isprint>

Allowed location:

  • <body>

Format and encode output strings.

<isredirect>

Allowed location:

  • Before the DOCTYPE declaration

Redirect to a target URL.

<isremove>

Allowed location:

  • Anywhere in the template

Remove user-defined variables.

<isreplace>

Allowed location:

  • Must be within <isdecorate> tags

The insert content to be decorated.

If a template is going to be remotely included, the <isdecorate> tags can be in the including template.

<isscript>

Allowed locations:

  • <head>
  • <body>
  • Anywhere that script tags are valid

Create a script within a template.

<isselect>

Allowed location:

  • Anywhere in the template

Enhancements to the HTML <select> tag.

<isset>

Allowed location:

  • Anywhere in the template

Set user-defined variables.

<isslot>

Allowed location:

  • <body>
  • Usually within <isdecorate> tags

Define slots for content display.

<isstatus>

Allowed location:

  • Anywhere in the template

Define a status code.

See also:

Parent topic: