Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

This article describes how to customize the CoreOne Suite email templates and translate them into other languages.

Concept

The e-mail templates are stored in XSLT format and are transformed to an HTML file with XML data at runtime. All available e-mail templates can be overwritten by creating the corresponding files in the following folder:

C:\ProgramData\itsense\Templates

Info

Note

When creating templates, always keep in mind that certain e-mail clients such as Microsoft Outlook can only display a limited subset of the HTML / CSS functionalities. Simple DIVs are already displayed incorrectly there. It is therefore recommended to use a table layout and / or to test the templates well!

Structure of the templates

The templates are all built according to the same pattern. For each notification there is a main file which references all template parts. The file "EMailVerification.EN.tpl" is listed below:

...

Line 1

Code Block
[TemplatePart "../Parts/XslTemplateHeader"]

References the default template header. This contains the customer's logo and the general design in a standard installation.

Line 3

Code Block
[TemplatePart "../Parts/HtmlHeaderBeforeTitle"]EMail verification[TemplatePart "../Parts/HtmlHeaderAfterTitle"]

References the default template before and after the heading as well as the actual heading in the current language.

Line 12

Code Block
<p><b><xsl:value-of select="Items/Item[Key = 'verification_pin']/Value" /></b></p>

Output of the Verification PIN

Line 15

Code Block
 [TemplatePart "../Parts/HtmlFooter"]

References the default template footer.

Multilingualism

The templates can be built up multilingual. To do this, add the extension of the corresponding language to the corresponding template file. If no language is specified, the file is used as default.

...

The language used is always determined via the core identity. If no language is defined there or if a language is defined that has not been translated, the default template is used.

Useful Functions

Formatting dates and times

Get the current date in the format 30.01.2021:

...

Code Block
<xsl:value-of select="format-time(current-time(), '[H01]:[m01]')"/>

How-To articles

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel in ( "how-to" , "templates" ) and type = "page" and space = "IKB"

...