Content modeling in Kontent.ai
Jumping back to the coffee example, every barista goes through some training. They learn how to set up and use the espresso machine, how to froth milk, or how to dose coffee.
Later they can apply that knowledge and modify steps to prepare different kinds of beverages. They do it because knowing your tools and how to use them is essential to get the best possible results. With content modeling, the same rule applies. You can’t be a master just from the theory.
Table of contents
- Get yourself familiar with Kontent.ai’s highly flexible content modeling options – content types, content items, components, content type snippets, taxonomies, guidelines, and content item variants.
- Create a testing project in Kontent.ai for training purposes, and try modeling scenarios described in this guide.
- Maximize the use of content type snippets, linked items, components, and variants to build a highly flexible model.
Before you start creating a production-ready content model, we recommend that you follow this modeling example to familiarize yourself with the fundamentals of Kontent.ai.
Intro to content modeling fundamentals
Imagine that you own a coffee shop that sells two different flat white coffees. The goal is to model this in Kontent.ai for your website. To get the most out of the exercise, create a testing project, and try to model it yourself along with the article.
First, you’ll need a Flat white content type to represent all flat whites. Content types are basically templates or forms. When it comes to content, every coffee has the same structure, so one content type is enough.
Then, you need the coffee to have a name, a description, and ingredients. Add three content type elements to your Flat white content type:
- A text element named Name
- A rich text element named Description
- A rich text element named Ingredients
This could be enough for a basic coffee model, yet wouldn’t it be superb to have also a photo gallery for each coffee on the menu? Pictures are usually reused and also contain special information like a title or a description. So that you can do all of that, create another content type, named Coffee picture. Add these two elements:
- An asset element named Picture
- A text element named Description
Add metadata and connect everything together
It’s also suitable to tag what's in the picture so that you can filter pictures better later on. Such information is called metadata. For example, to filter the pictures based on the used mug type:
- Create a Mug types taxonomy with some terms.
- To the Coffee picture content type, add a taxonomy element called Mug type.
- Set the Mug types taxonomy to be available in the Mug type element.
Now, the only thing that’s left is adding the pictures to our content type for coffees.
- Go back to the main Flat white content type.
- Add a linked items element called Pictures.
- Set up the properties of Pictures so that only Coffee pictures are allowed for the photo gallery.
The main part of content modeling is now done. However, flat whites can be a regular flat white or a soy flat white. The regular flat white is an instance of flat white. In content modeling, that’s called a content item. Content items are the actual representations of the content type (the template) that you created before.
Extend your content model
If you decide to serve breakfasts later, you might realize that you miss nutritional info and allergens on the website. These are common for coffee as well, so you want to add them to the existing Flat white content type, too.
As you’ll use the same set of two elements in both content types, you can make your work easier by using content type snippets. That way, you can reuse or extend them in one place.
The great thing about Kontent.ai is its content reuse. Once you create a content type, it can be seamlessly reused and embedded as linked items or directly within rich text areas as components. Every content item can also have variants that are usually used for translation. You never know if you don’t go international one day.
Reusing vs. copying
In some cases, copying can still make more sense. For example, when a content item or type serves just as a template for another item or type. When this happens, you can clone both content items and content types.
Completing this exercise should give you a good feel of the available tools in Kontent.ai and how to use them. In the next article, let's go quickly through all the available options and their best practices.