Interface ITemplateResolver
The template resolver is responsible to find what template to use for a certain type.
Namespace: EPiServer.Web
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7Syntax
public interface ITemplateResolver
Remarks
The template resolver can be extended using Template
Methods
Resolve(Object, Type, TemplateTypeCategories, IEnumerable<String>)
Resolves what rendering template that should be used for the provided item given that it is of the provided template category.
Declaration
TemplateModel Resolve(object item, Type itemType, TemplateTypeCategories category, IEnumerable<string> tags)
Parameters
Type | Name | Description |
---|---|---|
System. |
item | The item of which type the template should be associated with. |
System. |
itemType | in case item is null then type is used for resolving |
Template |
category | The category of template type that should be returned. |
System. |
tags | The tags to use when selecting a template. |
Returns
Type | Description |
---|---|
Template |
A Template |
Remarks
The template tags are treated as a prioritized list meaning a template with a tag matching a preceding tag will be preferred.