dw.util
Class Template

Reads an ISML template from the file system and renders it into a
MimeEncodedText object. Optional substitution values can be
passed to the isml template via the render(Map)
method. Substitution parameters can be accessed within the template through
<isprint value="${param.parameter}">or for backward compatibility through
<isprint value="${pdict.parameter}">The access through pdict only gives access to the parameter map provided at rendering time and doesn't offer access to the system PipelineDictionary. The pdict access to the property map is only considered to ease the transition from SendMail pipelet API based templates. If the PipelineDictionary or properties of the PipelineDictionary are needed, they need to be included in the Property map passed to the render method.
Constructor Summary
Method Summary
render()
:
MimeEncodedText
Renders the template specified at instantiation time, without any substitution parameters.
render(params
:
Map)
:
MimeEncodedText
Renders the template specified at instantiation time with the given substitution parameters.
Methods inherited from class
Object
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
Constructor Detail
Template
public Template(templateName
:
String)
Creates a new template. Doesn't render the template until
render() or render(Map)
is invoked. The current request localeID will be used for Rendering.
Parameters:
templateName
-
file system path to the ISML template
Template
Creates a new template with the locale being set to the given localeID.
Rendering doesn't happen until render() or
render(Map) is invoked.
Parameters:
templateName
-
file system path to the ISML template
localeID
-
localeID to be used for Rendering
Salesforce Commerce Cloud Courses
Salesforce B2C Commerce Developer - Certification Tests
Why risk failing the SFCC exam? Get 180 real questions, killer content, and everything you need to crush the Salesforce B2C Commerce Developer certification.
Becoming a Salesforce B2C Commerce Developer is your ticket to higher salaries, better job opportunities, and the credibility to stand out from the competition. But let's be honestβpassing the certification exam isn't easy. That's where we come in.
Becoming a Salesforce B2C Commerce Developer is your ticket to higher salaries, better job opportunities, and the credibility to stand out from the competition. But let's be honestβpassing the certification exam isn't easy. That's where we come in.
Salesforce Javascript Developer I - Certification Tests
Not just another prep courseβthis is your shortcut to passing. Master JavaScript for Salesforce and go from 'hoping to pass' to knowing you will. Ready to start?
This isn't just another prep courseβit's your shortcut to mastering the skills and confidence you need to pass. With multiple practice tests covering every section and a final exam simulation designed to mirror the real thing, you'll feel like you've already aced it before test day.
This isn't just another prep courseβit's your shortcut to mastering the skills and confidence you need to pass. With multiple practice tests covering every section and a final exam simulation designed to mirror the real thing, you'll feel like you've already aced it before test day.
Salesforce B2C Commerce Architect - Certification Tests
Think the Developer exam was hard? Welcome to the next level.
The Salesforce B2C Commerce Architect certification is a whole different gameβcomplex solutions, elevated difficulty, and skills that set you apart in the eCommerce industry. That's why we're including 11 downloadable PDF guides, packed with best practices and strategies to help you prepare for the exam and build confidence in every topic.
The Salesforce B2C Commerce Architect certification is a whole different gameβcomplex solutions, elevated difficulty, and skills that set you apart in the eCommerce industry. That's why we're including 11 downloadable PDF guides, packed with best practices and strategies to help you prepare for the exam and build confidence in every topic.
Method Detail
render
render()
:
MimeEncodedText
Renders the template specified at instantiation time, without any
substitution parameters. Any isprint tags referring to param/pdict will
be unresolved and will be replaced with empty strings. If there's an
explicit localeID set through setLocale(String),
it takes precedence over the localeID associated with the current
request.
Returns:
MimeEncodedText with isprint tags referring to param/pdict replaced with an empty String
render
Renders the template specified at instantiation time with the given
substitution parameters. These parameters are available to ISML templates
through variables named 'param' and 'pdict'. Note that in this context,
pdict is not referring to the system PipelineDictionary, as the System
Pipeline Dictionary is not accessible from this script API. If there's an
explicit localeID set through setLocale(String),
it takes precedence over the localeID associated with the current
request.
Parameters:
params
-
Map of substitution parameters which are specified within the ISML template. Access is available from within the ISML template through named variables param or pdict.
Returns:
MimeEncodedText containing the rendered template. Variables in the template referring to param/pdict are replaced with the value from the params map or empty if the value isn't found in the map