Versions Compared

Key

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

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

...

The template editor

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

  • The name of the template . It - it must be unique amongst all the templates for the same application;
  • The name of the application to which the template belongs. The application cannot be changed for saved templates;
  • The type of templatetemplates:
    • Default : - this type of template is editable using the HTML editor. Support It supports simple data binding using {xxx} syntax;
    • Razor : - select this template type to create template templates that uses require programming logic to generate output. The composed the template This type of templates 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

Application provides a set of data for display when invokes the template rendering APIA template can accept data input and use data binding to produce dynamic output. However, the data set varies for different operationstructure and fields of the input data depend on the application of the template. You can use the following steps to discover what is available for binding the full data set available for the particular applicable operation:

  1. Create a “test” template of the "Default" template type template;
  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 “test” template for the operation;
  4. Click the Test Mail button on the template toolbar;
  5. The the full data set is displayed as JSON.
  6. Use this JSON as reference to create data binding in your template.