isscript Element

Support server-side scripts for scriptlets and inline script expressions, using ${ }syntax.




The script expressions are supported everywhere expressions are supported, including in tags and inline.

These are the top-level variables available to scriptlets:

Variable Description See Also
session The current internal Salesforce B2C Commerce session dw.system.Session
request The current internal B2C Commerce request dw.system.Request
pdict The current Pipeline Dictionary dw.system.PipelineDictionary
out PrintWriter for the HTML page

Variables set in the template script context are one of two types with respect to their scope:

Variable Scope
Page scope

These are either well-known variables set by the template at run time or those defined in the scriptlet.

Variables of this scope are available, once set, through template execution context and can be referenced from multiple scriptlets or expressions in the template or its local includes.

Tag scope

Variables of this type are defined within certain tags. For example, <isloop... status="safe"/> defines variable safe of type.

Tag scoped variables are available, once declared, in the tag context only.


	var foobar = pdict.firstname + " " + pdict.lastname;
	out.print( foobar );

Multiple script snippets in one file share the same execution context:

	var fullname = pdict.firstname + " " + pdict.lastname;
	out.print( fullname );
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.