Architects
This guide covers strategies for designing effective component architectures in Agility CMS, including component types, patterns, and best practices.
This guide covers strategies for designing effective component architectures in Agility CMS, including component types, patterns, and best practices.
Components (formerly called "modules") are reusable UI building blocks that:
Note: The Next.js SDK still uses "module" terminology in code (e.g.,
allModules,module.contentid). This is legacy naming. In Agility CMS, these are now called "components" and "component models."
Characteristics:
Example: Hero component
Characteristics:
Example: Post Listing component
Characteristics:
Example: Bento Section
Characteristics:
Example: Personalized Background Hero
Component → Content Item
Example: Hero → Hero content fields
Use When:
Component → Content List Reference
Example: PostListing → Posts content list
Use When:
Component → Content Item → Nested Content List
Example: BentoSection → BentoSection content → BentoCards list
Use When:
Component → Filtered Content (by Audience/Region)
Example: PersonalizedBackgroundHero → Hero items filtered by audience
Use When:
All components must be registered in the frontend application:
// src/components/agility-components/index.ts
const allModules = [
{ name: "ComponentName", module: ComponentName },
// ... more components
]
Note: The variable name
allModulesand propertymoduleare from the Next.js SDK's legacy terminology. In Agility CMS, these are now called "components" and "component models."
Critical: Component names must match Agility CMS definitions (case-insensitive).
Combine components to build pages:
Next: Performance - Performance considerations