Lorenzo GM

Insights on web development, software engineering, and modern tech practices

Lorenzo GM

Content Modeling with Contentful: Building Scalable Digital Experiences

Discover the principles of content modeling in Contentful through practical examples, from basic content types to complex relationships and modular design patterns.

CMS
Content Modeling with Contentful: Building Scalable Digital Experiences

Content modeling is the foundation of any successful content management system. It defines how content is structured, organized, and related to create flexible and maintainable digital experiences. In this article, we'll explore content modeling principles using real examples from a production Contentful space.

What is Content Modeling?

Content modeling is the process of defining the structure and relationships of your content before building your application. Think of it as creating a blueprint for your content architecture. A well-designed content model enables:

  • Flexibility: Easy content updates without code changes
  • Scalability: Support for growing content needs
  • Consistency: Standardized content structure across the system
  • Reusability: Modular components that can be shared across pages

Content Types Overview

The content model we'll examine consists of 13 carefully designed content types, each serving a specific purpose in the overall architecture. Understanding the complete ecosystem helps us see how individual components work together to create a flexible, maintainable content management system.

Foundation Content Types

These content types form the backbone of the website structure:

  • 📜 Page - The primary container for all website pages, defining URL paths and content areas
  • 📚 Article - Long-form content with rich text, images, and metadata for blog posts and articles
  • 📚 Content Item - Flexible content blocks for reusable text, images, and links

Component Content Types

Modular components that can be composed to build rich page experiences:

  • 💎 Content Section - Modular page sections with various layout options for displaying content
  • 💎 Content List - Dynamic lists that can display articles or custom content in multiple formats
  • ❓ FAQ - Question and answer pairs with categorization and priority features

Navigation Content Types

Components that handle site navigation and linking:

  • ⚛ Navigation Link - Individual navigation items with support for hierarchical menus
  • ⚛ Link List - Grouped navigation collections for organizing related links
  • 🔗 Link - Basic linking component for both internal pages and external URLs

Media Content Types

Centralized media management:

  • 🖼 Image - Centralized image management with proper accessibility metadata

System Content Types

Configuration and structural components:

  • ⚙️ Config - Global configuration settings for URL patterns and site behavior
  • ⚙️ Layout - Site-wide layout components including headers, footers, and navigation structure
  • ⚙️ SEO Metadata - Dedicated SEO optimization fields for pages and content

This structured approach creates a flexible, maintainable content ecosystem where each type has a clear responsibility and can be composed together to build complex digital experiences.

Core Content Types

Let's examine the fundamental building blocks of a robust content model:

1. Page Architecture

The Page content type serves as the foundation for all website pages:

📜 Page
├── Internal Name (Text)
├── Path (Symbol) - Unique URL path
├── Top Content Area (Array of Components)
├── Bottom Content Area (Array of Components)
└── SEO Fields
    ├── SEO Title
    ├── SEO Description
    ├── SEO Keywords
    ├── Canonical URL
    ├── No Index (Boolean)
    └── No Follow (Boolean)

This structure separates content from presentation, allowing editors to build pages by selecting and arranging components without touching code.

2. Content Components

The model uses a component-based approach with specialized content types:

Articles for Long-Form Content

📚 Article
├── Internal Name
├── Slug (Text) - URL-friendly identifier
├── Title
├── Date
├── Image (Reference to Image)
└── Body (Rich Text)

Content Items for Flexible Blocks

📚 Content Item
├── Entry Field
├── Title
├── Description
├── Body (Rich Text)
├── Image (Reference)
└── Links (Array of Link references)

3. Media Management

Image content type with comprehensive metadata:

🖼 Image
├── Internal Name
├── Image Asset
├── Alternative Text (Localized)
└── Caption

This approach centralizes image management and ensures proper accessibility with required alt text.

Modular Design Patterns

Page Sections

The model implements modular page sections that can be mixed and matched:

Content Sections

💎 Content Section
├── Internal Name
├── UI Layout Options:
│   ├── "Teaser - Image Fullwidth"
│   ├── "Teaser - Image Right"
│   ├── "Two Columns - Image Left"
│   └── "Two Columns - Image Right"
└── Entry (Reference to Article or Content Item)

Content Lists

💎 Content List
├── Internal Name
├── UI Options:
│   ├── "3 Cards - Landscape"
│   ├── "4 Cards - Square"
│   ├── "Accordion"
│   ├── "Carousel"
│   └── "Timeline"
├── Title
├── Entry Source:
│   ├── "Articles" (Auto-populate)
│   └── "Custom" (Manual selection)
└── Custom Entries (Array)

This pattern separates content from presentation, allowing the same content to be displayed in different layouts.

Navigation and Information Architecture

Navigation Links

⚛ Navigation Link
├── Internal Name
├── Link (Reference)
└── Link List (Array of sub-navigation)

Link Lists for Grouped Navigation

⚛ Link List
├── Internal Name
├── Title (Localized)
└── Links (Array of Link references)

Basic Link Component

🔗 Link
├── Internal Name
├── Text
├── Page (Internal link)
└── URL (External link)

Advanced Features

FAQ System

❓ FAQ
├── Internal Name
├── Question
├── Answer (Rich Text)
├── Category (Dropdown)
├── Tags (Array)
├── Priority (1-10)
├── Is Published (Boolean)
├── Related Articles (References)
└── Last Updated (Date)

Site Configuration

⚙️ Config
├── Internal Name
├── Slug Product Detail Page (Localized)
└── Slug Article Detail Page (Localized)

Layout Management

⚙️ Layout
├── Internal Name
├── SEO Metadata (Reference)
├── Logo (Image reference)
├── Header Navigation (Array)
├── Footer Navigation (Array)
└── Footer Navigation Secondary (Array)

Content Modeling Best Practices

1. Atomic Design Principles

  • Break content into small, reusable components
  • Build complex layouts from simple building blocks
  • Maintain consistency across the system

2. Flexible Reference System

  • Use references instead of duplicating content
  • Allow content to be reused across multiple contexts
  • Implement proper content relationships

3. Presentation Flexibility

  • Separate content structure from visual presentation
  • Provide UI layout options within content types
  • Enable content reuse with different visual treatments

4. SEO and Metadata

  • Include SEO fields at the page level
  • Provide localization support where needed
  • Implement proper content hierarchy

5. Editorial Experience

  • Use clear, descriptive field names
  • Provide helpful validation and constraints
  • Organize fields logically for content editors

Implementation Benefits

This content model approach provides several advantages:

For Developers:

  • Clear separation of concerns
  • Predictable content structure
  • Easy to query and manipulate content
  • Flexible component composition

For Content Editors:

  • No code changes required for content updates
  • Visual page building through component selection
  • Consistent content structure
  • Reusable content components

For Organizations:

  • Scalable content architecture
  • Consistent brand presentation
  • Efficient content workflows
  • Future-proof content strategy

Conclusion

Effective content modeling in Contentful requires careful planning and a deep understanding of your content needs. By implementing modular, component-based structures with clear relationships and flexible presentation options, you can create a content management system that scales with your organization's growth.

The key is to think in terms of content components rather than rigid page templates, enabling maximum flexibility while maintaining consistency across your digital experiences.

Remember: good content modeling is an investment in your future. Take time to plan your structure carefully, and you'll reap the benefits in maintainability, scalability, and editor experience for years to come.