Administrators
This guide covers creating, modifying, and managing component models (formerly called "module definitions") in Agility CMS.
This guide covers creating, modifying, and managing component models (formerly called "module definitions") in Agility CMS.
Note: "Module Definitions" is the old terminology. The current term is "Component Models." The Next.js SDK still uses "module" terminology in code (e.g.,
allModules,module.contentid), but in Agility CMS, these are now called "components" and "component models."
Component Models define the structure of reusable UI components that can be placed on pages. They define what fields a component has and how those fields are configured.
Enter component name and description:
Important: Component name must match frontend registration (case-insensitive).
Add fields to your component model:
Common Field Types:
For each field:
Click "Save" to create the component model.
Critical: Component names must match frontend registration.
Frontend Registration:
// src/components/agility-components/index.ts
const allModules = [
{ name: "ComponentName", module: ComponentName },
]
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."
Naming Rules:
Safe Operation:
Warning:
Warning:
Pattern: Direct field mapping
Example: Hero component
Pattern: Component links to content items
Example: Post Listing component
Pattern: Component has nested content
Example: Bento Section
Next: Page Models - Managing page models