---
title: Defining a new document type (ASPX)
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

Each document in Kentico is of a certain type, such as page, news, product, article, etc. Every document type has its own data fields. The document type describing computer products will have fields storing the computer name, processor type, RAM size, disk size and product image.

1. Open the **Document types** application.
2. Click **New document type**. This starts the **New document type** wizard.
3. Enter the following values in **Step 1**:
   - **Document type display name**: _Computer_ (the system displays this name to users in the administration interface)
   - **Namespace**: _custom_ (namespace to distinguish your document types from the default system types that use the cms namespace)
   - **Name**:_computer_ (the identifier of the document type)

     ![Setting names for the new document type](https://docs.kentico.com/docsassets/k8tutorial/defining-a-new-document-type-aspx/NewDocType_1.png "Setting names for the new document type")
4. Click **Next**.
5. In **Step 2**, specify the name of the database table where the system stores the data of computer documents. You also need to enter the name of the table's primary key field. Leave the default values.
6. Click **Next**. The system creates a new database table for computer documents.
7. In **Step 3**, you need to define the fields of the document type (columns of the table). Click **New field** to create the following fields. For each field, enter the values, click **Save** and repeat the procedure until you have defined all the listed fields.

   - **Field name**: ComputerName
   - **Field type**: Text
   - **Field size**: 200
   - **Required:** yes (checked)
   - **Field caption**: Computer name
   - **Form control**: Text box
   - **Field name**: ComputerProcessorType
   - **Field type**: Text
   - **Field size**: 200
   - **Field caption**: Processor type
   - **Form control**: Drop-down list
   - **Editing control settings -> Data source**: select **List of options** and enter the following items into the text area, one per line:

     ```text

     Athlon;Athlon
     Pentium XEON;Pentium XEON
     Pentium Core 2 Duo;Pentium Core 2 Duo
     ```
   - **Field name**: ComputerRamSize
   - **Field type**: Integer number
   - **Field caption**: RAM (MB)
   - **Form control**: Text box
   - **Field name**: ComputerHddSize
   - **Field type**: Integer number
   - **Field caption**: HDD (GB)
   - **Form control**: Text box
   - **Field name**: ComputerImage
   - **Field type**: File
   - **Field caption**: Image
   - **Form control**: Upload file

     ![Defining the fields of a new document type](https://docs.kentico.com/docsassets/k8tutorial/defining-a-new-document-type-aspx/NewDocType_Fields.png "Defining the fields of a new document type")
8. Click **Next**.
9. In **Step 4**, choose the **ComputerName** field as the **Document name source**.

   > **Info:** This means that when a user creates a new computer document, the system automatically fills in the document name based on the **ComputerName** value. The document name appears in site navigation and in the content tree of the **Pages** application.
10. Click **Next**.
11. In **Step 5**, select the document types that will be supported as parents for computer documents in the content tree. Click **Add document types**, select the **Page (menu item)** document type and click **Select**. This means that users are only allowed to place computer documents under pages, not under articles, news items or other document types.
12. Click **Next**.
13. In **Step 6**, assign the document type to all websites where you wish to use it. Click **Add sites**, choose **My website** in the selection dialog and click **Select**.
14. Click **Next**.
15. Click **Finish** to complete the creation of the new document type.

The wizard automatically creates the database table and several default transformations.

> **Info:** **How does the system store document content?**
>
> The system stores document content and all related data in three database tables:
>
> - **CMS\_Tree** (content tree structure)
> - **CMS\_Document** (general document properties, metadata and editable region content)
> - A **dedicated document type table** - in this case _**CUSTOM\_Computer**_ (stores the values of the document type's specific fields)
