Class TemplateResolverEventArgs
Event argument used in ITemplateResolverEvents when a template is resolved for a requested content type.
Inheritance
System.Object
TemplateResolverEventArgs
Namespace: EPiServer.Web
Assembly: EPiServer.Cms.AspNetCore.Templating.dll
Version: 12.0.3Syntax
public class TemplateResolverEventArgs : EventArgs
Constructors
TemplateResolverEventArgs(Type, Object, IEnumerable<TemplateModel>, IEnumerable<String>)
Initializes a new instance of the TemplateResolverEventArgs class.
Declaration
public TemplateResolverEventArgs(Type renderType, object itemToRender, IEnumerable<TemplateModel> templates, IEnumerable<string> tags)
Parameters
Type | Name | Description |
---|---|---|
System.Type | renderType | Type of the render. |
System.Object | itemToRender | The item that should be rendered. |
System.Collections.Generic.IEnumerable<TemplateModel> | templates | The template models. |
System.Collections.Generic.IEnumerable<System.String> | tags | The tag. |
Properties
ItemToRender
Gets the item that should be rendered.
Declaration
public object ItemToRender { get; }
Property Value
Type | Description |
---|---|
System.Object |
RenderType
Gets the current type to resolve template for.
Declaration
public Type RenderType { get; }
Property Value
Type | Description |
---|---|
System.Type |
RequestedCategory
The categorey that was requested for
Declaration
public TemplateTypeCategories RequestedCategory { get; set; }
Property Value
Type | Description |
---|---|
TemplateTypeCategories |
SelectedTemplate
Gets or sets the selected template.
Declaration
public TemplateModel SelectedTemplate { get; set; }
Property Value
Type | Description |
---|---|
TemplateModel |
SupportedTemplates
Gets all supported templates that has been registered for the current template request.
Declaration
public IEnumerable<TemplateModel> SupportedTemplates { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TemplateModel> |
Tags
Gets or sets the template tags that should be or has been used to resolve the template.
Declaration
public IEnumerable<string> Tags { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |