Contentful logo

Contentful Community

How to do good content modelling for page layouts?

It seems like Contentful works well if you’re creating something simple like a blog. However, when creating content for multiple pages, I struggle to see how you’d keep the content models maintainable and organized. Say you want to use Contentful for multiple pages:

About page
Product page
Home page
... etc

Would you create a content-type for each of these pages?

Rather than separate content types for each page, I would create a single Page content type with

  • a Title field
  • a Slug field
  • either a Rich Text field or a multi-reference field to hold the majority of the page content
  • and any other fields which are common to all page types

I’d also create a bunch of component building blocks as content types like Image Carousel, Header, Footer, etc. Then you or your editors can build an About Page with the specific pieces (i.e., components) needed for it.

Thanks @charlie, but wouldn’t that approach only work well for simple sites like a blog, where the structure is all the same? How modules are represented in an About page vs Product page vs Blog page are very different in layout. Does that mean I’d have to create a new content type for each layout? And new layouts for each minor variant?

Although Contentful works for a simple blog, it still seems like a pain to maintain and scale on a whole site.

Contentful is about your content in a page. For layouts and layout variations you will use CSS. You can have a layout field where you can have an array of predefined layout CSS classes or better layout ids the editors can choose