Skip to Content

ISML Completion

Tag, attribute, value, template path, custom tag and expression completion in ISML templates, plus the ISML live templates and postfix templates

Completion covers ISML tags, attributes and values, the templates of the linked cartridges, custom tags and the Script API in expressions, with quick documentation beside the list

Tag names complete after < with their required attributes as grey text. Accepting a tag writes those attributes and puts the caret in the first value

Tags

Tag names complete after < and </, with required attributes as grey text and deprecated tags struck out. Accepting a tag writes its required attributes with the caret in the first value, such as <isslot id="" context="" with the caret in id

After </ only tags with a body are offered. Custom tags complete next to the built-in ones, see Custom Tags

Attributes and values

Required attributes come first in bold. Once one attribute of a group is present the others leave the list, so <isinclude template> no longer offers url. Accepting an attribute writes ="", or ="${}" for an expression attribute

Type textValue
${...}An expression, such as condition or items
templateA template path
A list of valuesA fixed set, such as relative|daily for <iscache type>
nameA variable name, such as <isset name>
route or URLA route or a URL

Values complete for fixed sets and boolean attributes, each with the first sentence of its description, so every <isprint> encoding says where it fits. Matching ignores case

Template paths

The template value of <isinclude>, <isdecorate> and <ismodule> completes every template of the linked cartridges, relative to templates/<locale> and without .isml. Folder prefixes and a leading / work

Type textMeans
app_storefront_baseOnly this cartridge has the path
app_custom +1The first cartridge that has it, and how many more have the same path

The same paths complete in scripts, for example in res.render('cart/cart'), see SFCC Contracts

Expressions

Inside ${...} and <isscript> completion offers template variables, pdict members, Resource, URLUtils, StringUtils and out, imported classes and the Script API. SFCC strings complete too: the route in ${URLUtils.url('Cart-Show')} and the key in ${Resource.msg('button.checkout', 'cart', null)}. Routes complete in your own URL helpers too, once they are added under SFCC Route Calls. See Scripting in ISML for where the types come from

Live templates

The ISML group in Settings › Editor › Live Templates expands with Tab, and the items also show in completion

AbbreviationExpands to
isif, isife, isifel<isif>, with an <iselse> branch, or with <iselseif> and <iselse>
isloop, isloops<isloop>, and with status="loop". The variable is named after the items
isset<isset> in page scope
isprint<isprint> with an encoding
isinc, isincu<isinclude> of a template, or of a route with URLUtils.url
isdec, isrep<isdecorate> and <isreplace/>
ismodAn <ismodule> custom tag declaration
isscr, iscom<isscript> and <iscomment>
iscont, iscache<iscontent> for HTML and <iscache> for 24 hours
isslot, isobj<isslot> in global context and <isobject>
isres, isurlResource.msg(...) and URLUtils.url(...), inside an expression

Fields suggest template paths, routes, resource bundles and keys, and attribute values. The suggestions need a license, the templates don't

Postfix templates

Typed after an expression inside ${...}, a postfix template turns it into a tag:

TemplateTurns ${pdict.products} into
.isif<isif condition="${pdict.products}"></isif>
.notempty<isif condition="${!empty(pdict.products)}"></isif>
.isloop<isloop items="${pdict.products}" var="product"></isloop>
.isprint<isprint value="${pdict.products}" encoding=""/>
.isset<isset name="" value="${pdict.products}" scope="page"/>

On this page