Watch video

*Document types are the most important concept in Umbraco. * 
It may also be the concept that confuses and frustrates a new user the most. This chapter and the entire *Document Types *chapter are about explaining document types in details.

Before you add content to your site, you need a place to store it. Let’s take a look at a fresh Umbraco installation. If I try to create content, I need to provide a name and select a type. But in this clean installation, there are no document types defined, so I am not able to create any content yet. You need to define what data to store before you can enter content.

**Everything that you do on your site will build upon the document types you create. **

The document type is the data definition for your content. *Notice that the data definition depends on your content. Your site is unique. There is no other site in the world that is going to be quite like it. Therefore, your document types will be unique*, to match your content. A document type defines the data, **but isn’t the actual data itself. That’s the content.

  • ** AN ANALOGY ** 
    If you ever thought of keeping track of your growing movie collection, you can imagine the first question you are going to ask. What do you want to keep track of? You would like to keep track of the title, and genre, and when it was released, who is the director, did it receive any awards, what language is it in. Well, you can see it can be quite complex. But, once you knew what data to keep track of, you would create the database table or a spreadsheet with those fields. You will go through the same process creating document types at *Umbraco. *

*What do you want to keep track of? * 
The first step is to create a document type that defines what data you want to store – what you want to keep track of.

Once you have the document type, you can create as much content as you like, once you have a place to store it in. 
What you keep track of, depends on your site’s specific needs.

Different kinds of pages need different document types. ** 
Your site will have more than one document type. Just like you have different kinds of pages on your site, like the Home page, which is different from the Staff Detail page, which is different from a Contact page. **You will have a number of document types to define the different data represented in your content.
 The different kinds of pages need different document types to store their unique data.

Create a new document type when you have different data. ** 
So let’s build on the movie collection analogy for a moment. What if you also want to keep track of your music collection? **Because there is a difference in the kind of data we want to store, there will be a difference in the document types.
 You would create separate document types – one for movies, one for music. Then we have the flexibility in each of them to keep track of whatever is unique about them.

As you use *Umbraco*, you will soon feel confident about when to create a new document type. Here are a few tips to get you started.

*Create a new document type if you think you need to. * 
If you think you need a new document type, you probably do. You wouldn’t think to yourself, I wonder if I need a new document type for this, if you have an existing document type that already meets your needs. For instance, if you if you’re adding another movie, or an MP3 to your collection, you are all set. You’ve got a document type for movies and music already. But what if you wanted to add a book? Neither the movie nor music document type is right to define the data that is unique to a book. You want to create a unique book document type.

Create a new document type for every design template. 
Here’s a second tip. When the site designer shows you a template or a bunch of Photoshop files of the new site that you’re going to build, there’s a good chance that there will be a new document type for every one of those page designs the designer shows you. Why? The designer doesn’t show you every page in the site, just the pages that require a different presentation. For instance, all product pages look the same, they contain the same bits of information and the product page is different from a blog post. The designer will show you what a product page looks like and what a blog post looks like. It doesn’t always work exactly this way but it’s a very good rule of thumb when you are getting started.

How many document types are you likely to have? 
It really depends on your site. You might build a site with only two document types, or hundreds, or more. You’ll need as many document types as your site needs. It really depends on what you are building.

Fortunately, with Umbraco, you can have an unlimited amount of document types. 
Let’s review this chapter.

*1. You can’t enter content into Umbraco until there is a place where to put it, and that’s the document type. *

*2. A document type is the data definition for your content. *

*3. Different kinds of content will have different data and therefore different document types. Because Umbraco isn’t a system you just team or skin, you can mold and fashion Umbraco to fit your needs precisely, and it all starts with document types. Document types: it’s one of the reasons why Umbraco is so flexible and powerful. *

Now that you’ve come to understand what a document type is, it’s time to go hence on in the remaining chapters.

Document Types

Total Time: 00:51:14

This is the most important thing you need to learn about Umbraco. Understanding the concept of Document Types and how to work with them is the foundation of your Umbraco knowledge.