- Namespace:
- Redakt.ContentManagement.Annotations
- Assembly:
- Redakt.ContentManagement.dll
Specifies a view that can be selected for this content type model.
[AttributeUsage]
public sealed class AllowViewAttribute: IContentTypeAttribute
- Inheritance:
- ObjectAttributeAllowViewAttribute
- Implements:
- IContentTypeAttribute
Constructors
AllowViewAttribute() |
Specifies the view that can be selected for this content type model by providing either a view name or view path through the appropriate property.
|
AllowViewAttribute(string) |
Specifies the view that can be selected for this content type model by view name. The view name is the filename of the Razor view without (.cshtml) extension and path, e.g. for a Razor view with path '~/Views/ContentPage.cshtml' the view name is 'ContentPage'. If the name causes conflicts with other views with the same name but a different view path, use the property with the parameterless constructor instead.
|
Properties
Names |
Gets or sets the name of the view that can be selected for this content type model. The view name is the filename of the Razor view without (.cshtml) extension and path, e.g. for a Razor view with path '~/Views/ContentPage.cshtml' the view name is 'ContentPage'. If the name causes conflicts with other views with the same name but a different view path, use the property instead. The view name is case insensitive.
|
ViewPath |
Gets or sets the view path of the view that can be selected for this content view model. Must be the relative path from the web content root, e.g. '~/Views/ContentPage.cshtml'. The view path is case insensitive.
|
Methods