nothing in = nothing out!
Step 1 of any site is to create a "Document Type" – after a few installations you’ll become familiar with this terminology but at the start it might be a little bit bewildering. A Document Type is a data container in Umbraco where you can add data fields/attributes where the editor user can input data and Umbraco can use it to output it in the relevant part of a "template" (more on these later).
Document Types are infinitely extendable but usually you’ll add data fields - something like the following:
- Page title
- Sub Heading
- Body Text
- Meta Title
- Meta Description
Each Data Field has a type - e.g. a text string or a number or rich text body... we’ll come to this later.
Creating your first Document Type
Right, let’s get busy. Go to the Settings menu in Umbraco. This is the third button on the top menu. Then you’ll see a long list of settings – don’t worry about these yet, we’ll introduce them as we need them.
Document Types is positioned as the first option in the list and is always the starting point for any Umbraco build. Hover over the Document Types node and you’ll see three dots ... , click this to see the menu. Then you'll get four options, click the Document Type option - we want a template automatically created for us.
Using folders can help you organise your Document Types.
Give our new Document Type the Name = "HomePage" - you'll see that an alias is automatically created for us.
Enter in the Description field "This is our homepage template". This text is used to help the users select the correct document type later.
Click Save to store our new DocumentType.
Umbraco now adds a Document Type to the tree under the node. Now we're going to give this Document Type an icon to help our editors in the Content tree later. Click the white document icon next to the name field, enter "home" into the search field that appears and select the house icon.
Next, click the Permissions icon and check Allow as root. This will allow us to create a homepage at the root of the content tree (simple huh?).
If none of your Document Types have the Allow as root checked, all of them will be allowed to be created at the root level.
Next, we go back to the Design screen. Create a new group called "Content" (remembering to click Save after).
Now click on the Add property link – this is where we can create each of the necessary data containers in which the editors can enter the necessary content for the homepage.
Enter the Name "Page Title". When you move to the next field you’ll see Umbraco helpfully gives you the alias "pageTitle". Click the Add editor link and you'll see a long list of editors, select the "Textbox".
Remember to come back and explore this list of data types later - it's a hint to the power of Umbraco, we're just going to use the most simple data type for now
Umbraco will generate a long name for the Data type - ignore this for now and select Submit.
Now you can enter a Description, again helps the editor provide relevant content so we'll fill this in "The main title of the page (e.g. Welcome to Widgets Ltd)".
Ignore the rest of the fields for now and click the green Submit button at the bottom right.
Repeat this step, clicking the Add property at the bottom of the Content group and create the following properties:
|Type:||Richtext editor (use the search to help you find this, leave all the options as default and just click Submit)|
|Description:||The main content of the page.|
|Tab:||Footer (remember to add this!)|
|Description:||Copyright notice for the footer.|
Use the Add group link to create a new group called Footer for the Footer Text.
You should now have a Document Type that looks like this:
We’ve now created our first Document Type – Umbraco needs three things to create a webpage and this is the first and most important. It takes the data inside an instance of the Document Type and merges it with a template – we’ll create our template next.
How to create your first template and create a content node.