Watch video

In this chapter, we will take a look at the different datatypes. 
When you are adding a property to your document type, you select a type - that's the datatype. We will look at the most common default datatypes that are available in Umbraco Out of the Box.

*The datatype you choose will determine the type of control that will be displayed to the content editor. * 
It's important to pick the right type, to make it as easy as possible for your content editor to input content.

This datatype also determines the data that will be stored. 
This can be a simple textstrring, or it can be a snippet of HTML, it all depends on the datatype. Let's take a look at the most common default datatypes.

When adding a property, we set up a name, an alias, and we chose a type - that is the datatype. For instance, you have created a new document type, where you've just added a property of each of the default datatypes at Umbraco.

When you move over to Content, you will also have a Content document using that document type. Notice that some of these datatypes will need some customization before you can use them. This is something you will read about in the next chapter, which is all about customizing datatypes. For now, let's just take a look at what the datatypes look like.

  • Approved Color - it will simply render a Color Picker, where you can chose between some predefined color.

  • Checkbox List - this renders, basically, a check box list. You can chose between one or more options.

  • Content Picker - it allows you to chose a document type from your Content tree.

  • Date Picker With Time - it allows you to chose a date, and set up a time.

  • Date Picker - it only allows you to select a date.

  • Dropdown Multiple - it will render a list box where you are able to chose one or more options.

  • Dropdown - it renders a combo box where you are able to only choose a single option.

  • Label - this only outputs the label.

  • Media Picker - this allows you to select an item from your media library.

  • Member Picker - it allows you to select a member.

  • Numeric - it allows you to insert a numeric value.

  • Radiobox - it will render a list of options where you are only able to select a single one.

  • Related Links - it allows you to add internal, or external links. When you are adding a link, you will need a Caption, in this case an internal link, and then you are able to choose an internal page. It gives you the option to chose if you want to open this link in a new window or not. For an external link, you need a Caption and the URL of the page. The option of opening the link in a new window or not is also available for external links.

  • Rich Text Editor - this is a "what you see, is what you get" editor, so you are able to input text, media, bullet points, and so on.

  • Simple Editor - this only allows you to insert text, make the text bold, italic and also insert a link.

  • Tags - it allows you to tag your content.

  • Textbox Multiple - this is just a multi-line text control. You can enter multiple lines.

  • Textstring - this is a single line text.

  • Upload - it allows you to select and upload a file.

*Datatypes control the input control that the content editor will see and work with, and also control the data that will be stored. *

*Make it as easy as possible for your editors by choosing the best datatype for the job. *

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.