Interface IContentTypeBase
Defines the base for a ContentType with properties that are shared between ContentTypes and MediaTypes.
Namespace:System.Dynamic.ExpandoObject
Assembly:Umbraco.Core.dll
Syntax
public interface IContentTypeBase : IUmbracoEntity, IAggregateRoot, IDeletableEntity, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty
Properties
Alias
Gets or Sets the Alias of the ContentType
Declaration
string Alias { get; set; }
Property Value
Type | Description |
---|---|
System.String |
AllowedAsRoot
Gets or Sets a boolean indicating whether this ContentType is allowed at the root
Declaration
bool AllowedAsRoot { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
AllowedContentTypes
Gets or Sets a list of integer Ids of the ContentTypes allowed under the ContentType
Declaration
IEnumerable<ContentTypeSort> AllowedContentTypes { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ContentTypeSort> |
Description
Gets or Sets the Description for the ContentType
Declaration
string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Icon
Gets or Sets the Icon for the ContentType
Declaration
string Icon { get; set; }
Property Value
Type | Description |
---|---|
System.String |
IsContainer
Gets or Sets a boolean indicating whether this ContentType is a Container
Declaration
bool IsContainer { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
ContentType Containers doesn't show children in the tree, but rather in grid-type view.
NoGroupPropertyTypes
Gets or sets the property types that are not in a group.
Declaration
IEnumerable<PropertyType> NoGroupPropertyTypes { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<PropertyType> |
PropertyGroups
Gets or Sets a collection of Property Groups
Declaration
PropertyGroupCollection PropertyGroups { get; set; }
Property Value
Type | Description |
---|---|
PropertyGroupCollection |
PropertyTypes
Gets all property types, across all property groups.
Declaration
IEnumerable<PropertyType> PropertyTypes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<PropertyType> |
Thumbnail
Gets or Sets the Thumbnail for the ContentType
Declaration
string Thumbnail { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
AddPropertyGroup(String)
Adds a PropertyGroup. This method will also check if a group already exists with the same name and link it to the parent.
Declaration
bool AddPropertyGroup(string groupName)
Parameters
Type | Name | Description |
---|---|---|
System.String | groupName | Name of the PropertyGroup to add |
Returns
Type | Description |
---|---|
System.Boolean | Returns |
AddPropertyType(PropertyType)
Adds a PropertyType, which does not belong to a PropertyGroup.
Declaration
bool AddPropertyType(PropertyType propertyType)
Parameters
Type | Name | Description |
---|---|---|
PropertyType | propertyType | PropertyType to add |
Returns
Type | Description |
---|---|
System.Boolean | Returns |
AddPropertyType(PropertyType, String)
Adds a PropertyType to a specific PropertyGroup
Declaration
bool AddPropertyType(PropertyType propertyType, string propertyGroupName)
Parameters
Type | Name | Description |
---|---|---|
PropertyType | propertyType | PropertyType to add |
System.String | propertyGroupName | Name of the PropertyGroup to add the PropertyType to |
Returns
Type | Description |
---|---|
System.Boolean | Returns |
MovePropertyType(String, String)
Moves a PropertyType to a specified PropertyGroup
Declaration
bool MovePropertyType(string propertyTypeAlias, string propertyGroupName)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyTypeAlias | Alias of the PropertyType to move |
System.String | propertyGroupName | Name of the PropertyGroup to move the PropertyType to |
Returns
Type | Description |
---|---|
System.Boolean |
PropertyTypeExists(String)
Checks whether a PropertyType with a given alias already exists
Declaration
bool PropertyTypeExists(string propertyTypeAlias)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyTypeAlias | Alias of the PropertyType |
Returns
Type | Description |
---|---|
System.Boolean | Returns |
RemovePropertyGroup(String)
Removes a PropertyGroup from the current ContentType
Declaration
void RemovePropertyGroup(string propertyGroupName)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyGroupName | Name of the PropertyGroup to remove |
RemovePropertyType(String)
Removes a PropertyType from the current ContentType
Declaration
void RemovePropertyType(string propertyTypeAlias)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyTypeAlias | Alias of the PropertyType to remove |
SetLazyParentId(Lazy<Int32>)
Sets the ParentId from the lazy integer id
Declaration
void SetLazyParentId(Lazy<int> id)
Parameters
Type | Name | Description |
---|---|---|
System.Lazy<System.Int32> | id | Id of the Parent |