You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

template()

Usage

template(name, locale, source)

Description
Loads a node of type MailTemplate with the given name and locale values and uses the given source entity to resolve template expressions in the content field of the loaded node, returning the resulting text.

Example

${template('MAIL_SUBJECT', 'de', me)}

with the MailTemplate content

Welcome, ${this.name}!

results in

Welcome, admin!

Note
This function is quite similar to the replace() function which serves a similar purpose but works on any string rather than on a mail template.

Search results for "template()"

template()

Loads a node of type MailTemplate with the given name and locale values and uses the given source entity to resolve template expressions in the content field of the loaded node, returning the resulting text.

template(name, locale, source)