Skip navigation

Content modeling in Kontent.ai

5 min read
Download PDF

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

    Key points

    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
    Diagram of the current model

    A diagram of the model so far

    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:

    1. Create a Mug types taxonomy with some terms.
    2. To the Coffee picture content type, add a taxonomy element called Mug type.
    3. 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.

    1. Go back to the main Flat white content type.
    2. Add a linked items element called Pictures.
    3. 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.

    Diagram of the current model

    Content types and taxonomies with visible relationships

    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.

    Diagram of the current model

    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.

    What's next?

    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.

    Discover the tools you can use