Table of Contents

Class RegisterEmailTemplateAttribute

Namespace
Kentico.EmailBuilder.Web.Mvc
Assembly
Kentico.Content.Web.Mvc.dll

Registers a email template definition to be used within the system.

public sealed class RegisterEmailTemplateAttribute : RegisterComponentAttribute, IPreInitAttribute
Inheritance
object
Attribute
RegisterEmailTemplateAttribute
Implements
Inherited Members
Extension Methods

Constructors

RegisterEmailTemplateAttribute(string, string, Type)

Registers a email builder email template.

public RegisterEmailTemplateAttribute(string identifier, string name, Type componentType)

Parameters

identifier string

Unique identifier of the email template definition.

name string

Name of the registered email template.

componentType Type

Type of the registered email template component.

Remarks

Make sure to provide unique identifier for the email template definition from the start. This identifier is used within the email configuration and any further change can lead to incorrect configuration load. Consider specifying identifier in format 'CompanyName_ModuleName_EmailTemplateName', e.g. 'Kentico_DigitalMarketing_NewsletterEmailTemplate'.

Properties

ContentTypeNames

The content types this email template is registered for.

public string[] ContentTypeNames { get; set; }

Property Value

string[]

PropertiesType

Type of the registered email template properties model.

public Type PropertiesType { get; set; }

Property Value

Type

Remarks

The type needs to implement the IEmailTemplateProperties interface.

Methods

PreInit()

Registers the email template definition during application pre-initialization.

public override void PreInit()