Class TemplateSavedNotification
A notification that is used to trigger the IFileService when the SaveTemplate method is called in the API, after the template has been saved.
Inheritance
object
Namespace: Umbraco.Cms.Core.Notifications
Assembly: Umbraco.Core.dll
Syntax
public class TemplateSavedNotification : SavedNotification<ITemplate>, IStatefulNotification, INotification
Constructors
View SourceTemplateSavedNotification(IEnumerable<ITemplate>, EventMessages)
Initializes a new instance of the TemplateSavedNotification class with multiple templates.
Declaration
public TemplateSavedNotification(IEnumerable<ITemplate> target, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<ITemplate> | target | The templates that were saved. |
| EventMessages | messages | The event messages collection. |
TemplateSavedNotification(ITemplate, EventMessages)
Initializes a new instance of the TemplateSavedNotification class with a single template.
Declaration
public TemplateSavedNotification(ITemplate target, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| ITemplate | target | The template that was saved. |
| EventMessages | messages | The event messages collection. |
Properties
View SourceContentTypeAlias
Gets or sets the alias of the content type the template was created for.
Declaration
public string? ContentTypeAlias { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
This is used when creating a document type with a template. It is not recommended to change or set this value.
CreateTemplateForContentType
Gets or sets a value indicating whether the template was created for a content type.
Declaration
public bool CreateTemplateForContentType { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |