Versions Compared

Key

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

Table of Contents
maxLevel1
typeflat

Einleitung

Dieser Artikel beschreibt wie sie die EMail Templates der CoreOne Suite auf ihre Bedürfnisse anpassen und in andere Sprachen Übersetzten können.

Konzept

Die EMail Templates sind im XSLT-Format abgelegt und werden zur Laufzeit mit XML Daten zu einer HTML Datei transformiert.

...

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. The original templates, which are located in “C:\Program Files\ITSENSE AG\Application Service\Templates”, should not be changed. All available e-mail templates can be overwritten by creating the corresponding files in the following folder:

C:\ProgramData\itsense\Templates

...

Aufbau der 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:

Code Block
languagediff
[TemplatePart "../Parts/XslTemplateHeader"]
	<xsl:template match="/DictionaryOfString_String">
		[TemplatePart "../Parts/HtmlHeaderBeforeTitle"]EMail verification[TemplatePart "../Parts/HtmlHeaderAfterTitle"]
		<tr>
			<td colspan="5">Please verifiy yourself by entering the following PIN:</td>
		</tr>
		<tr>
			<td colspan="5"> </td>
		</tr>
		<tr>
			<td colspan="5">
				<p><b><xsl:value-of select="Items/Item[Key = 'verification_pin']/Value" /></b></p>
			</td>
		</tr>
		[TemplatePart "../Parts/HtmlFooter"]
	</xsl:template>
</xsl:stylesheet>

...

The template in detail:

...

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.

Mehrsprachigkeit

Die Templates können Mehrsprachig aufgebaut werden. Dazu fügt man der entsprechenden Template Datei die Endung der entsprechenden Sprache hinzu. Wird keine Sprache angegeben, wird die Datei als Standard verwendet.

...

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.

File

Language

EmailVerification.tpl

Standard Template

EmailVerification.EN.tpl

...

English

EmailVerification.FR.tpl

...

French

EmailVerification.IT.tpl

...

Die verwendete Sprache wird dabei immer über die Core Identität ermittelt. Ist dort keine Sprache definiert oder ist eine Sprache definiert die nicht übersetzt wurde, wird das Standard Template verwendet.

...

Italian

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-date(current-date(), '[D01].[M01].[Y0001]')"/>

Get the current time in the format 08:15:

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"