Files
nexus/wiki/concepts/ContentModel-first.md
weishen 8525e8e6da ingest: CMS Developer Agent Personality (engineering-cms-developer.md)
- Source: sources/engineering-cms-developer.md
- Entities: WordPress, Drupal
- Concepts: ContentModel-first, CodeOverConfiguration
- Updated: index.md (Sources/Entities/Concepts), overview.md, log.md
2026-05-01 15:21:22 +08:00

1.9 KiB

title, type, tags, last_updated
title type tags last_updated
ContentModel-first concept
cms
development
methodology
2026-05-01

Definition

ContentModel-first is a CMS development principle that mandates: before writing any theme or template code, the fields, content types, and editorial workflow must be fully defined and locked. This applies to both WordPress and Drupal development.

Core Principle

"Content model first. Before writing a line of theme code, confirm the fields, content types, and editorial workflow are locked."

Application

WordPress

  • Define custom post types, taxonomies, and ACF field groups before building templates
  • Lock down field names, types, validation rules
  • Plan display variants (teaser, full, card, hero)

Drupal

  • Define content types, paragraph types, vocabulary terms, and entity references first
  • Use Paragraphs or Layout Builder for flexible editorial content
  • Export all configuration to YAML before writing custom modules

Why It Matters

  • Prevents rework: Template code rarely needs to change when the data model is stable
  • Reduces editor confusion: When fields are well-named and organized, editorial UX improves
  • Enables parallel work: Front-end developers and content strategists can work simultaneously once the model is agreed
  • Improves maintainability: Adding a new field is a data modeling decision, not a template hotfix

Anti-patterns

  • Building templates for undefined fields
  • Creating post types through the admin UI without documenting the schema
  • Changing field names after templates reference them

Sources