By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.

Content Modelling in Contentstack

George Ovechkin
Architect

This article will focus on content modeling strategies to fulfill the following needs:

  1. Implementing a one-page template for all website pages.
  2. Enabling the repositioning of components on a page without requiring developer engagement.
  3. Allowing for changes to a component in one location to be reflected throughout the site.

Contentstack Basics

In Contentstack, a key foundation is the Content-Type. Think of it as a blueprint or template that defines the properties of your upcoming content piece. If you’re familiar with object-oriented programming, you can liken it to a class. With a Content Type, you can generate various Entries, which are content components complete with their text, assets, and more.

The diagram above shows an example of utilizing Content Types and Entries.

Now, how can we structure this into pages? The answer lies in creating a Content-Type that combines other content types. It’s pretty straightforward, isn’t it?

Page Template per Page Group

Here’s the summary of what you need to do:

  1. Identify pages with similar layouts and group them.
  2. Create a content type for each group of pages.
  3. Generate entries for each page.

It’s not the same for the homepage; it aims to appeal more to the user.

Indeed, we’re aiming for greater flexibility to enable the movement of components within a page.

Modular Blocks

Modular blocks give content managers the flexibility to create rich pages without engaging a developer to change the content type structure.

So, now, if we can change the order of the components and the modular block allows us to add a variety of components, we are able to create one generic page to handle all the cases. Be aware of the limits!

Utilizing reference fields in Blocks allows for changes to a specific Component in one location, reflecting those changes wherever the component is used.

The following article explores the technical details of the front-end implementation. It will guide you in implementing a system that can handle a universal page without requiring developer intervention every time a content manager changes the CMS.