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.

    • Namespace: Umbraco.Core.Models
    • Assembly: Umbraco.Core.dll

    All samples in this document will require references to the following dll:

    • Umbraco.Core.dll

    All samples in this document will require the following using statement:

    using Umbraco.Core.Models;


    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 Guid.



    Gets the Id of the DataType as a Guid.


    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.


    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 String.


    Gets or Sets the parent Content Id as an Int.


    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.


    Returns a Bool indicating whether the given Content is currently in the recycle bin.