Class PublishedModelAttribute
Indicates that the class is a published content model for a specified content type.
Inheritance
System.Object
System.Attribute
Namespace: Umbraco.Core.Models.PublishedContent
Assembly: Umbraco.Core.dll
Syntax
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public sealed class PublishedModelAttribute : Attribute, _Attribute
Remarks
By default, the name of the class is assumed to be the content type alias. The
PublishedContentModelAttribute
can be used to indicate a different alias.
Constructors
View SourcePublishedModelAttribute(String)
Initializes a new instance of the PublishedModelAttribute class with a content type alias.
Declaration
public PublishedModelAttribute(string contentTypeAlias)
Parameters
Type | Name | Description |
---|---|---|
System.String | contentTypeAlias | The content type alias. |
Properties
View SourceContentTypeAlias
Gets or sets the content type alias.
Declaration
public string ContentTypeAlias { get; }
Property Value
Type | Description |
---|---|
System.String |