Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Current »

You can add, edit or test an email template using the template toolbar , or navigate to the /comms/templates URL to access all the email templates.

The template editor

The template editor opens when you add or edit a template. You edit the following information required for a complete template.

  • The name of the template - it must be unique amongst all the templates for the same application;
  • The application which the template belongs to - the application cannot be changed for saved templates;
  • The type of templates:
    • Default - this type of template is editable using the HTML editor. It supports simple data binding using {xxx} syntax;
    • Razor - select this template type to create a template and implement programming logic to generate output. The composed the template must conform to the Microsft Razor page syntax. The reference of the razor syntax can be found here: https://docs.microsoft.com/en-us/aspnet/core/mvc/views/razor?view=aspnetcore-3.0

Discover the data available for binding

The template takes a set of data as input when it is rendered. However, the structure and fields of the input data set depend on the application that renders the template. You can use the following steps to discover what is available for binding in the particular operation:

  1. Create a template and select the "Default" template type;
  2. Add {*} to the template body and save the template;
  3. Navigate to the application's template configuration page, e.g. OneList notification channels, RoleManager email settings, and select the newly created template for the operation;
  4. Click the Test Mail button on the template toolbar;
  5. The full data set is displayed as JSON.
  6. Use the JSON as the reference for creating the data bindings in your template. 



  • No labels