ContentType attribute is required for content types, and is located in the
EPiServer.DataAnnotations namespace and has the following configurable properties.
|Defines whether you can create content of this type in edit view.
|Text that describes the function of the
|The name shown in edit view for this
|The sort order used to determine the
ContentType’s position in listings.
|Identifier for the
ContentType. You can match the code definition to an existing definition in the database.
|Name for grouping
ContentTypes when you display them for selection in edit view.
Access attribute defines which users, roles, and audiences have access rights to create content of a specific type in the user interface. Filtering based on this attribute is applied after ordinary access rights on content.
If the Access attribute is not present, any user (who has edit access) can create content of the specific type.
|Behavior if not specified
|Defines which users, roles, and audiences have access rights.
|No user has access to
|Defines the level of access to grant.
ContentTypes support access level Create only.
AvailableContentTypesAttributes to set which content types are available under a content instance; it has the following configurable properties.
|Defines whether all or no content types are available. If you set none, other settings on the attribute is ignored.
|A type array of typed content to specify which content types are available under a content instance of the type with the attribute.
|A type array of typed content to specify which content types are not available under a content instance of the type with the attribute.
|States that the content with this attribute is available under the typed content in the type array.
|States that the content with this attribute is not available under any of the typed content in the type array.
The types given on
ExcludeOn can be typed content directly, or it can be the type of an interface or a base class. Registered types that can be assigned to the specified type are included at registration. For example, if an interface is specified in an Include list, then typed pages that implement the interface are included.
Include differs from
IncludeOn in the following ways
Includeexcludes typed content except that which is specified.
IncludeOndoes not exclude any content type for types that have all content types available.
Exclude differs from
ExcludeOn in the following ways.
Exclude– If types are not registered in
Include, then registered page types are available except the types in the
ExcludeOn– If types are registered in
Include, then those types are available except the types in the
The following image shows how
Availability is mapped to settings in the admin view.
ImageUrl attribute to set the icon for content types. The icon is visible in the user interface when you create content.
|The path to the icon to use for the page type.
Updated 23 days ago