Class TemplateDescriptorAttribute
Attribute that describes a template
Inheritance
Namespace: EPiServer.Framework.DataAnnotations
Assembly: EPiServer.Cms.AspNetCore.Templating.dll
Version: 12.0.3Syntax
public sealed class TemplateDescriptorAttribute : Attribute
Constructors
TemplateDescriptorAttribute()
Default constructor
Declaration
public TemplateDescriptorAttribute()
TemplateDescriptorAttribute(Type)
Constructor for a modeltype
Declaration
public TemplateDescriptorAttribute(Type modelType)
Parameters
Type | Name | Description |
---|---|---|
System. |
modelType |
Properties
AvailableWithoutTag
Gets or sets a value indicating whether the renderer should be available even when no specific tag is requested.
Declaration
public bool AvailableWithoutTag { get; set; }
Property Value
Type | Description |
---|---|
System. |
|
Remarks
Default value is true if no Tags is specified else false.
Default
Gets or sets a value indicating whether this Template
Declaration
public bool Default { get; set; }
Property Value
Type | Description |
---|---|
System. |
|
Description
Gets or sets the description.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System. |
Inherited
Gets or sets a value indicating whether model types derived from Model
Declaration
public bool Inherited { get; set; }
Property Value
Type | Description |
---|---|
System. |
ModelType
Gets or sets the model type for the described template should be registered for.
Declaration
public Type ModelType { get; set; }
Property Value
Type | Description |
---|---|
System. |
Remarks
This property is required if the template doesn't implement the IRenderTemplate<TModel> interface or if multiple descriptor attributes are added to the same template. If the template does implement the IRenderTemplate<TModel> interface, this type must match or be a subclass of the type passed to the interface.
Name
Gets or sets the name of the template.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System. |
Path
Gets or sets the path to the render.
Declaration
public string Path { get; set; }
Property Value
Type | Description |
---|---|
System. |
Tags
The tags that this renderer support.
Declaration
public string[] Tags { get; set; }
Property Value
Type | Description |
---|---|
System. |
Remarks
Use Tag
TagString
Gets or sets the render tags as a comma-separated list.
Declaration
public string TagString { get; set; }
Property Value
Type | Description |
---|---|
System. |
The render tag. |
Remarks
This can be used instead of Tags if your project is CLS-compliant.
TemplateTypeCategory
Gets or sets the template type of the renderer.
Declaration
public TemplateTypeCategories TemplateTypeCategory { get; set; }
Property Value
Type | Description |
---|---|
Template |