Computer Magic Logo
Introduction

Monday, June 15, 2015

Published by Aristotelis Pitaridis

Document types are used in order to define objects with properties organized in categories which will be used by Umbraco in order to manage and display information on the web page. Most developers are a bit confused about how to use the Document Types but after creating some Document Types and use them in conjunction with the other tools in Umbraco, everything becomes clear and easy to use.

When we create a web site using one of the starter websites, Umbraco will create some Document Types for us so that we will have a working web page. If we do not select a starter website, the list of Document Types will be empty so that we will create our own Document Templates.

A Document Type consists of multiple predefined properties but it allows us to create more properties in order to cover our needs. Every property has a Name and an Alias. The name is the user friendly name of the property which describes the information that the administrator of the web site should type. The Alias is the name of the property which is used in our code.

For every property we create we have to define what is going to be the type of this information so that the Back Office will use the equivalent property editor in order to collect the information from the user.

Another characteristic of a property is the tab in which it is going to be placed. Tabs allow the system administrator to organize the properties in groups.

The administrator also can define if a property is a mandatory or optional and in some cases the administrator may define a validation which will be used in order to make sure that the user typed the information in the right format.

A description can be defined for the property so that the administrator will help the users of the site to understand what kind of information should be submitted to the selected property.