I am a newbie on the Umbraco CMS and wants to share my experiences during my learning curve period. Feel free to comment on by posts: Am I doing something wrong, should I use another methodes, do you have other experiences – do share with me and the other readers.
The building blocks of Umbraco
Every CMS builds on some sort of items. An item is the content container, it contains a number of properties (fields) in which you can add content. In Umbraco everything is an item. Other CMS systems operates with predefined types like “Page” or “Paragraph” (Dynamicweb CMS), Ubraco leaves it up to you, the developer to define which “Document types” there should exist on a given website.
In Umbraco one of the very strong features is the way you can easily create your content holders, your “Document types”. Each Document type consists of a number of fields which each is of a given “Data type”:
- Document Type (found under settings)
- Data Type (found under developer)
- Data Type (found under developer)
So you can create any kind of content using those basic building blocks. You have a number of Ubmraco predefined Data types like when you start a new Umbraco solution. Let me show how it looks like inside the Umbraco dashboard.
Umbraco Document Type – “Person”
The dialogue box for creating a new document type in Umbraco
This is the dialogue box you see when you create a new Document Type. The document type, when created, can be used by the editor of the website to add content to the website. Lets create a document type “Person” to hold name and age.
Umbraco document property – a container field
Creating a property on a document type in Umbraco
This is the dialogue box you see when you create a new property on a Document type. You can see some of the types in the dropdown box. The list shows the defined Data types on the current website. If you cannot find an appropiate data type you can define your own easily.
The fields of the document property are easy to understand, I will not go into dept here explaning them.
- We create at document property named “Name” and select type “text string”.
- Also we create a property called “age” and select type “Numeric”
With that done our new Document Type “Person” is ready to use.
We will add the new Person item under another document type, and first we need to tell the system that our Person document type can be inserted under the base document type – the “root” in our content tree.
Tell the system that you should be able to add Person types to the content structure
Open the base document type in the “settings > document types” section. Find the tab “Structure” and check the “Person” in the list of document types. That will tell the system that the “base” type can contain “Person” types.
Setting up allowed child document types for a document type in Umbraco
Create a Person item
Creating an item in Umbraco
I have right clicked in the content structure of my website and in the dialogue box I have entered “Sten” as the name and choosen the “Person” document type. That will create an item which is called Sten and is of the type Person.
I now should enter values in the item:
Adding content to the fields of item in Umbraco
The values for “Sten” is “Sten Hougaard” as name and in the age field I enter “48″. I click either the Save or the “Save and publish” icon and I am done.
Default values – or standard values
To make it even easier to create content I want to add the option to the system to have “Default values” – or standard values for my Document types. In Umbraco that is not a standard feature, but with the package system of Umbraco it only takes a few minutes to add the feature to the system.
Open the “Developer > Packages > Umbraco package Repository”
The Umbraco package Repository is a place like an “app store” known from your smartphone or tablet. It contains a number of extra features you can use to extend your Umbraco system.
In the Search box enter: “standard values”:
The Umbraco package repository - search for standard values
You can see the first search result is called “Standard Values in Umbraco”, click on it and you will get more information about the package. Click on the Install package and you are home free, ready to go! You may have to logout and login before the functionality will be active.
Goto “Settings > Standard values”
When you open the Standard values you will see a list of the defined Document types defined in your system. The idea is that you locate the type, enter some (default) values and save the item.
In future when you create a new item, it will have the values pre defined as standard (default) values on your new item. Very usefull!
Happy implementing! And do give me feedback either as a comment or by rating this post, thank you.