Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Summary

JEMHC allows you to create and customise templates that are used to render the outbound email content. These templates allow you to modify the Subject and the content (Text and HTML). Templates use a markup language called Velocity, to learn more about this, new users should read the Velocity User Guide.

...

This shows the new Template Set dialog which needs a Name, a Template Set Type and a Theme to be created.

...

image-20240523-111628.pngImage Added

There are lots of types of template, select an appropriate type, eg Issue Created:

...

This will delete the template from JEMHCloud. This will impact any notification mappings if in use.

Email hasn't been sent as no useful information was displayed based on the used template.

When a notification is rendered all Velocity macros are processed and their output is placed into the body of the notification. This will always result in static Macro content like the header and the footer of the notification being rendered which is fine unless there is no tangible or useful content to the notification. For example, you could find yourself receiving notifications that have a header, a footer and absolutely nothing else because the Macros that output the comments - for whatever reason - found no comments in the event.

To put a stop to wasteful notifications we provide a feature where the notification will be ignored if one of these two methods are not called anywhere within the Template or the macros used in the Template Set used by the Notification Mapping.

The two methods are:

Code Block
$jemhUtils.setCommentRendered()
	and/or
$jemhUtils.setFieldRendered()

Note - these do not control whether to display the comment or fields themselves, instead these methods control whether to display the entire notification or not. The Template Set is run once for each recipient user and if neither of these methods is called for an individual user then that user won't get the notification. It's possible that a macro will call one of the methods for, say, a JSD agent but not for a JSD customer - such as when an internal comment is made.

Previewing Templates

When a template is edited, a previously created Preview Context can be used to drive the template, selected in (1) below:

...

The template content can be previewed in TEXT or HTML (2):

...

The HTML preview is a restricted view to avoid common CSS injection problems that content within the Preview Context can cause. After the user clicks through a warning, the user can see the fully rendered content:

...

Fully rendered HTML:

...

Filter by label (Content by label)
showLabelsfalse
max8
sortmodified
showSpacefalse
reversetrue
cqllabel in ( "template" , "macro" ) and type = "page" and space = "JEMHC"