How-to: Content Modeling in Contentful

Content Modeling in Contentful

A solid content model is the foundation of every successful Contentful project. It gives structure and organization to your content and tells Contentful APIs what kind of content to send to your application.

Content modeling is a tricky thing that, if done incorrectly, can create challenges for your editors. When launching your website on Contentful, it’s critical to get your content model right from the outset or risk the headache of editing your content structure.

In this article, we’ll share some best practices for successful content modeling in Contentful.

What is Contentful?

Contentful is a headless content management system (CMS) that empowers companies to leverage content more efficiently and effectively to deliver premium, multichannel digital experiences.

Contentful enables editors to organize different types of content, such as text, images, audio and data, into impactful vignettes and leverage them in various combinations or permutations across different contexts, channels, and devices.

What is Content Modeling?

A content model is like a blueprint that organizes and structures your content. It consists of different content types that act as templates, outlining what information goes into each piece of content.

Within each content type are fields that define what data to include in the content. For instance, a web page or news article would contain fields for title, body text, and media files. That helps transform your website or app content from a shapeless "blob" into organized and structured components.

Designing your content model is the most important step in creating a well-organized and future-proof Contentful-powered application.

Your model should meet the needs of everyone involved in content creation and distribution, from creators to designers and developers.

Getting Started

Before you dive in, it's important to get in the headless mindset. Having worked with other content management systems (CMS), you might be familiar with things like pages and blocks. You may have set up your navigation with a page tree interface, with everything tied to the context of a website.

But in Contentful, you must separate your content from context. Youcan still build the page or other content types that help you define elements on your website. But you also need tounderstand when to decouple elements from that context.

Here's an example:

Pretend you're in the retail space, and you need to rebuild your website. But you also have some digital in-store displays installed at your brick-and-mortar locations.

Contentful was designed to help you manage the content for both in one place.

Your website and in-store displays share a lot of the same information — product names, sizes, colors, etc. Product can be your first content type, pulled in by your in-store display.

product content type-min.PNG

You will need this information on the product detail page of your website. But you will also need SEO data, additional page copy, and possibly, some references to related products. That is where the Page content type comes in.

page content type-min.PNG

You now have all the content you need for your in-store display and website. But most importantly, you have it separated from the context. That will future-proof your content model.

You can scale content and add new contexts for consuming the content without affecting your existing store display or website.

4 Tips for Content Modeling in Contentful

With over 150 projects under our belts, the Nansen team has become CMS experts — and content modeling is somewhat of a specialty.

Here are the top tips we've found make for the most successful content models:

1. Include all stakeholders in the discussion

Content modeling isn't any one project stakeholder's responsibility. It's a group effort.

Everyone from the developers to the business team should play a role when you create a content model. Brainstorming can be helpful. Check out the photos of a whiteboarding session we did as a team for one of our client implementations below as an example.

Developers should call out what's possible from a development perspective and communicate what the resulting experience will look like for editors.

By the end of the session, you should all agree on the expected project outcome.

page properties content modeling-min.JPG

article listing content modeling-min.JPG

2. Leverage Content Hierarchy

The context of your content may include navigation. For example, website pages might have sub-pages. Or you may need to take users through a multi-step process in your mobile app. You can set up this structure via your content modeling.

Think of a blog listing page as an example. Your start page is the root with a path of mysite.com/. The blog listing page would then be a sub-page of the start page at mysite.com/blog/. And each blog post is an additional level down at mysite.com/blog/blogpost1.

The diagram below helps visualize this.

In Contentful, you can represent this structure with Top-Down Hierarchy. If you have a Page content type, it can have a reference to one—or many—other instances of Page type content items.

This top-down referencing structure can reflect the same page tree structure as in a standard CMS.

That allows you to define a relationship between content without limiting your content model to a specific context.

Content Page Tree Example.PNG

3. Avoid Deep Nesting

In the product detail page example above, an instance of page content referenced an instance of product content. This idea of content referencing other content is called nesting. We leveraged nesting in every example in this article so far.

While nesting is necessary, editors can find it confusing if taken too far. As a best practice, Contentful recommends you not nest more than four to five levels.

Three levels or less is ideal. Once you surpass three levels, it's easy for editors to lose context. They might see properties they need to edit but lose understanding of how those properties apply to the website.

This model below exemplifies how quickly you can lose context with deep nesting.

Content nesting example.PNG

While Banner Callout content might not reference all possible CTAs and links, in theory, it could. And that can get confusing.

The higher the number of references, the more complexity. For example, if an editor works on Blue Button CTA content, they could get confused about whether it needs editing for Page Teaser or Banner Callout. They may even lose track of which page they are on.

4. Use Flexible Assemblies

Contentful refers to content types that can reference other content types as assemblies. If your content type allows for a single reference, it's considered a fixed assembly. If multiple, it is a flexible assembly.

When in doubt, always opt for a flexible assembly model. We have seen instances where content modelers use fixed assemblies or topics (content types without references). In that case, if you have a blog page type as an example, it will only need basic page data and a rich text editor for the post.

The problem with that approach is that requirements are constantly changing. In a blog page scenario, the requirement might initially be a blog page. But what happens if you want to show teasers to related articles? Or if your post discusses a new product? You might want to reference it on the page.

It's better to configure these as flexible assemblies from the start.

Final Thoughts

We always consider these tips as we begin building out a content model. Do we stick to them always? No. Every project is unique, with its own set of requirements.

The most important thing is to keep a headless mindset. If you can do that, understanding which of these tips to apply to your project is easy.

Are you content modeling in Contentful? Check out our Content Modeling Best Practices for more practical advice.

Read the full post by clicking the link below
Content Modeling in Contentful
Sort

Related content

INSIGHT

Optimizely vs Adobe: Which DXP is right for you?

View Post
INSIGHT

What Is Content Modelng and Why Is It Important?

View Post
INSIGHT

Introducing Optimizely Graph: Revolutionizing the Way We Query Our Content

View Post
INSIGHT

Elevate Your Digital Experience with Optimizely's New SaaS Core CMS

View Post
INSIGHT

Opticon 2023: Diving Into The Future Of Digital

View Post
WHITEPAPER
View Whitepaper

The Comprehensive Guide to Contentful Content Modeling

By using our site, you agree to our use of cookies. Learn more.