Applies to Umbraco 6.x and newer
A DataTypeDefinition is what you see in the backoffice in the Developer / DataTypes tree. The listed nodes are definitions of the DataTypes that are available to use on your PropertyTypes.
All samples in this document will require references to the following dll:
All samples in this document will require the following using statement:
new DataTypeDefinition(int parentId, Guid controlId)
Constructor for creating a new
DataTypeDefinition object where the necessary parameters are the id of the parent as
Int and the Id of the DataType's control as a
Gets the Id of the DataType as a
Gets or Sets a
DateTime object, indicating then the given Content was created.
Gets or Sets the Id of the
User who created the Content.
Gets or Sets the DatabaseType as a
DataTypeDatabaseType enum for which the DataType's value is saved as.
Returns the unique
Content Id as a
Int, this ID is based on a Database identity field, and is therefore not safe to reference in code which are moved between different instances, use Key instead.
Guid assigned to the Content during creation. This value is unique, and should never change, even if the content is moved between instances.
Gets or Sets the given
Content level in the site hierarchy as an
Int. Content placed at the root of the site, will return 1, content right underneath will return 2, and so on.
Gets or Sets the name of the content as a
Gets or Sets the parent
Content Id as an
Gets or Sets the path of the content as a
String. This string contains a comma separated list of the ancestor Ids including the current contents own id at the end of the string.
Returns the given
Content index, compared to sibling content.
Bool indicating whether the given
Content is currently in the recycle bin.