Class ContentTypeModelBase<TPropertyType, TPropertyTypeContainer>
Serves as the base model for content types, parameterized by property type and property type container.
Inheritance
Namespace: Umbraco.Cms.Api.Management.ViewModels.ContentType
Assembly: Umbraco.Cms.Api.Management.dll
Syntax
public abstract class ContentTypeModelBase<TPropertyType, TPropertyTypeContainer> where TPropertyType : PropertyTypeModelBase where TPropertyTypeContainer : PropertyTypeContainerModelBase
Type Parameters
| Name | Description |
|---|---|
| TPropertyType | |
| TPropertyTypeContainer |
Constructors
View SourceContentTypeModelBase()
Declaration
protected ContentTypeModelBase()
Properties
View SourceAlias
Gets or sets the unique alias (identifier) of the content type.
Declaration
[Required]
public string Alias { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
AllowedAsRoot
Gets or sets a value indicating whether this content type is allowed to be a root node.
Declaration
public bool AllowedAsRoot { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Collection
Gets or sets a reference to the collection that this content type belongs to, if any.
Declaration
public ReferenceByIdModel? Collection { get; set; }
Property Value
| Type | Description |
|---|---|
| ReferenceByIdModel |
Containers
Gets or sets the collection of property type containers associated with this content type model. Each container groups related property types for organizational purposes.
Declaration
public IEnumerable<TPropertyTypeContainer> Containers { get; set; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<TPropertyTypeContainer> |
Description
Gets or sets the description of the content type.
Declaration
public string? Description { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Icon
Gets or sets the icon associated with the content type.
Declaration
[Required]
public string Icon { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
IsElement
Gets or sets a value indicating whether this content type is an element.
Declaration
public bool IsElement { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Name
Gets or sets the name of the content type.
Declaration
[Required]
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Properties
Gets or sets the collection of property types associated with the content type.
Declaration
[Required]
public IEnumerable<TPropertyType> Properties { get; set; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<TPropertyType> |
VariesByCulture
Gets or sets a value indicating whether the content type varies by culture.
Declaration
public bool VariesByCulture { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
VariesBySegment
Gets or sets a value indicating whether the content type varies by segment, such as language or culture segment.
Declaration
public bool VariesBySegment { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |