This class provides support for rendering ISML templates. For more details about the ISML syntax, refer to the
Commerce Cloud Digital developer documentation. Templates are stored as *.isml files. They are located in a
locale-specific folder under the '/cartridge/templates' folder, with '/cartridge/template/default' being the default
locale. The template name arguments of the various render methods represent the template path (without file ending)
within this folder structure.
Example for rendering a template with arguments from JavaScript code:
let isml = require('dw/template/ISML');
isml.renderTemplate('helloworld', {
Message: 'Hello, World!'
});
Example code for accessing the template arguments in the 'helloworld.isml' template from the above code snippet:
The message is: <isprint value="${pdict.Message}" />