Overview
Administration
All templates will be administrated by the Templates
tab in the client administration.
Menus
- Template Id: This dropdown box shows the currently selected template. By choosing another one, it will be loaded in the editor below.
- Reset: Removes all customizations for a template. The default (H&S) stated which comes with the setup will be restored.
- Delete: Deletes the currently selected language for a template.
- Add: Creates a completely new template.
- View Browser: Renders the current template with dummy values and displays it in the default browser.
- View Outlook: Renders the current template with dummy values and displays it in a "New E-Mail" window in outlook.
Template structure
Each template consists of 2 parts:
Arguments
Template arguments are prefixed with <!--
and end with -->
. They essentially are a name value collection of strings that will also be rendered.
They are mostly used for additional strings that need to be rendered besides the actual content. For example when rendering an E-Mail template,
the body, which would be the content of the template and the subject, which would be an argument were needed.
Every template has the description
argument which will be visible in the UI to describe what that template does or where it is used. The description also includes the tokens which can be used in the template.
Content
Everything after the arguments postfix (-->
) is considered to be the content of the template and will be rendered as such.
For the engine, it doesnt matter what format is used in the template (html, plain text,...). Everything which is not between {{
and }}
(mustaches)
will be emited as it is.
See Syntax for more details.
Localization
Every template has multiple language versions. Per default, we translate all system templates in every supported base language.
The icon besides the language indicates that there is a version of that template for this specific language.
By selecting a language, the specific version will be loaded in the editor. If there is no version for that language, the language default will be loaded.
For example, if a special translation for English (United States)
is needed and there is currently none, the English
version will be loaded in the editor when English (United States)
is selected.
It will then be saved as English (United States)
.
This allows to create specific language translaten based on common ones.
If an already existing language is edited, it will be saved as exactly the language it was created. (If English
gets edited it will still be saved as English
)
Rendering
When rendering a template, the currently selected UI language will be taken into account. If there is no template for that specific language, the language will be reduced until one is found.
For example:
The currently selected UI language is English (United States)
.
When rendering, the engine will try to find the best suited template for that language.
If there is a template localization for English (United States)
this will be used. If not, English
will be taken.
Global vars
Some templates contain a line similar to this partial('hs.inpoint.globalvars')
. This means, that the current template embedds the template hs.inpoint.globalvars
.
The content and variables are now also taken from this embedded template.
Currently we are using this to globally configure sender addresses for shares/reminders and newsfeed author and title.
All the variables from hs.inpoint.globalvars
can be overwritten in the template itself.
The hs.inpoint.globalvars
will be only provided in one language en
.
You can make language specific versions which will be used when rendereing that specific language, but per default (if no language specific template is found) the english one is taken.