Content modeling in a headless CMS: Structuring BCMS by content types
Published: 2024-06-14 14:45:09

[Content modeling](https://thebcms.com/blog/content-modeling-basics) refers to the process of defining the structure of content. Each type is described by its attributes, and broken down into individual components. Headless architecture is how you manage that content.

So, **content modeling in a headless CMS** intersects with how content types are defined and managed.

Unlike traditional CMS, headless separates the front-end presentation layer and the back-end content management layer; content is stored and managed separately from how it is presented to users. This means content can be easily reused and repurposed which leads to higher flexibility.

To make the most of this flexibility, content types must be independent of presentation layers. A content model can help in this situation. It is possible to create flexible, reusable content across multiple channels by defining content types using attributes that describe content instead of how it is presented.

In this article, you will learn how to configure headless CMS to specific needs.

## Content modeling in a headless CMS: The elements of a content model

There are slight differences between CMSs when it comes to content models and every CMS may refer to individual elements differently. However, the basic structure is always the same. A content model consists of three levels:

### **Level 1: Presentation layer**

The presentation layer is what the user sees later or how the content is presented.

### **Level 2: Content types**

Content types are specific types of content represented in the output layers. Common content types are, for example:

- Blog Post
- Product
- Image Gallery

A CMS usually comes with a set of predefined default content types but also, they can be defined completely freely. Important to know that the content types themselves do not yet contain any content; this is maintained in the fields.

### **Level 3: Fields**

There are two types of fields: Content and related fields.

Content creators use content fields to enter content into CMs. Often used fields are:

- Pure text
- Rich text
- HTML
- Image
- Video

Related fields do not contain any content themselves but display other content types and other content fields.

Ok, now that you understand the content structure, it is time to get familiar with BCMS's structure.

### Content modeling in a headless CMS: The BCMS basics

Content modeling is the process of designing data structures for your content. BCMS makes this easy by providing useful data structures that you can configure as needed.

There are five main structures in BCMS's content models: templates, entries, widgets, groups, and properties.

### BCMS templates

[Templates](https://docs.thebcms.com/inside-bcms/templates) in BCMS are a pre-defined content structure ( a section of the webpage). Based on that structure, you can create entries.



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/48x26jgc6htk0n0puw4d.png)

You can also give each template a description to describe internal processes, share resources, and explain what that template is being used for.

### BCMS entries

Each [entry in BCMS](https://docs.thebcms.com/inside-bcms/entries) represents one template record. The structure of the input depends on what properties its template has. Properties defined in the template will appear in the meta section of each entry. Besides the predefined meta, each entry has an area called the **content area**. You can add rich text and widgets there.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ggs2t5b07ji1v6rpka55.jpg)

### BCMS widgets

[Widgets in BCMS](https://docs.thebcms.com/inside-bcms/widgets) are reusable building blocks that are used inside of the entry's content area.

Here’s how to use them in BCMS:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/te0g0nhgtixptbql1vbe.gif)

As you can see, widgets are building blocks that help you add various types of content which gives a high level of flexibility and customization in structured content.

Learn more about widgets: [BCMS Widgets -everything you need to know](https://thebcms.com/blog/bcms-widgets-reusable-structured-content-tutorial)

### BCMS groups

Groups in BCMS are reusable building blocks that are made of multiple properties. Groups can be included in any template, widget, or even other groups. This way you can make content types and use them in any template you need because groups behave as independent components with defined instructions that enable independent use of the feature group.

For example, you need a call-to-action button for your blog. This is what it looks like:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wajkax89yr73zk3iwkjo.png)

Awesome thing, this CTA group you can use on any other page not only blog posts.

### Properties

Properties (or *inputs*) are the smallest piece of the BCMS ecosystem

(property/group/widget/template). Using different kinds of properties, you can create custom data structures for BCMS entries.

Properties are the foundation of BCMS functionality. Here's a list of available properties in BCMS:

- String
- Rich text
- Number
- Date
- Boolean
- Enumeration
- Media
- Group pointer
- Entry pointer

To learn more about BCMS properties check out the [documentation site.](https://docs.thebcms.com/inside-bcms/properties)

## Building content model: Blog example

Ok, now it’s time to get practical. In this part, I will show you how to structure your content by using content modeling in a headless CMS. I’ll use a blog post as an example. (This process you can use for any content model).

### Step 1: Create a template

To create a template, click on Add new template. In the next step, fill in the title, for example, Blog.

The next thing to do is to add properties to the Blog template. By adding properties you are actually making a custom data structure for a blog post.  For BCMS blogs that you like to read ( I hope so 🥰), I have 9 properties.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/abs0sntaafsuz6gby7r9.png)


- Title
- Slug- This property enables you to make SEO-friendly URL structure
- Created at
- Updated at
- Preview title
- Category - Tells to which cluster the blog article belongs
- Preview description- This property enables you to make SEO-friendly meta descriptions
- Image- Thumbnails for blog article
- Authors

### Step 2: Use Blog entry to create content

Enter the entry (😉) and fill in all the fields in the meta section. Content area is used for text, video, images, case studies, CTA, and so on.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aduxro6p2qabhtt0by99.gif)

### Step 3: Content model is ready to go live

The blog post is ready, the only thing left is to choose when to publish it. If not you can choose draft status and go write a new blog.

## The right CMS for content modeling

That’s all folks. As you can see, headless CMS makes content modeling straightforward.

To work effectively with content models, your content management must meet two requirements in particular:

- **Headless**: Your CMS must function according to the headless principle; only then can you enter structured and unformatted content and play it out to multiple frontends via a content API.
- **Individual content types**: Let your CMS define and configure your content types. This gives you the flexibility to meet the requirements of your projects with your CMS.