Document Types

The first step in any Umbraco site is to create a Document Type. A Document Type is a data container in Umbraco where you can add Properties (data fields/attributes) to input data. Each Property has a Data Type like text string, number, or rich text body. Umbraco outputs the input data using Templates.

These are some of the most common properties you would add to a Document Type:

  • Page title

  • Sub Heading

  • Body Text

  • Meta Title

  • Meta Description

Creating a Document Type

To create a Document Type:

  1. Go to Settings.

  2. Click ... next to the Document Types in the Settings tree.

  3. Select Create....

  4. Select Document Type with Template.

    Folders can help you organise your Document Types.

Creating a Document Type with Template
  1. Enter a Name for the Document Type. Let's call it HomePage. You'll notice that an Alias is automatically created.

    • The alias of the Document Type is automatically generated based on the property name. If you want to change the auto-generated alias, click the "lock" icon. The alias must be in camel case. For example: homePage.

  2. Click Save. Our new Document Type is now visible as a new item under Document Types.

    Saving a Document Type

Customizing the Document Type

Adding icons

With the help of icons, you can identify different Document Types in the Content Tree. To add an icon:

  1. Click the icon placeholder next to the document name. The Select Icon dialog opens.

    Selecting an icon
  2. Browse through the icon list and select the icon of your choice.

  3. Click Submit.

  4. Click Save.

Setting Permissions

To create a Document Type at the root of the Content Tree:

  1. Go to the Structure tab.

  2. Toggle the Allow at root button.

    Allow Document Type as root
If **Allow at root** is not enabled on the **Document Type**, you cannot create any content on your site.

Go to the **Permissions** tab.

![Allow Document Type as root](../../../../10/umbraco-cms/tutorials/creating-a-basic-website/images/figure-9a-allow-document-type-as-root-v8.png)

3. Click Save.

Adding Properties

To add properties to your Document Type, follow these steps:

  1. Go to the Design tab.

  2. Click Add Group.

  3. Enter a Name for the group. For this tutorial, we will call it Content.

    Adding a Group
  4. Click Add property. The Add property dialog opens.

  5. Enter a Name. For example: Page Title.

  6. Enter a Description. For example: The main title of the page (Welcome to Widgets Ltd.).

    Adding a property
  7. Click Select Property Editor.

  8. Select the Data Type of your choice. We'll add text in the search box and select the Textstring Data Type.

    Selecting a Data Type
  9. Click Add.

    • Remember to come back and explore the list of Data Types later.

  10. Repeat Steps 4 to 9 to add a Body Text using the specification below:

    NameBody Text

    Description

    The main content of the page.

    Data Type

    Richtext Editor

  11. Click Add Group to create a new group called Footer. Repeat Steps 4 to 9 to add a Footer Text using the specification below:

    NameFooter Text

    Description

    Copyright notice for the footer.

    Data Type

    Textstring

  12. Your Document Type should now look like this:

    Home Page with Properties
  13. Click Save.

We’ve now created our first Document Type. Umbraco takes the data from an instance of the Document Type (also called as Content Node). This data is then merged with a Template – let's create our template next.

Last updated