CMS Builder
The CMS Builder in Praisma Hub lets you define structured content types with fields, validations, localization, version history, and workflow rules. It’s designed for multi-tenant teams that need consistency, governance, and speed—without forcing engineers to redeploy code for every schema change.
What You Can Do
- Create custom content types (e.g., “Blog Post”, “Landing Page Section”, “Press Release”).
- Add fields (text, rich text, media, number, boolean, date/time, enum/tags, JSON, slug).
- Configure validations, defaults, and conditional visibility.
- Enable localization (multi-language) per field with fallbacks.
- Apply workflows (draft → in_review → approved → scheduled → published → archived / rejected).
- Control access using RBAC: field-level read/write permissions by role.
- Track revisions, diff changes, and rollback safely.
- Sync content to the Calendar and Social Posts modules for omnichannel planning.
Permissions & Prerequisites
- Required role:
owner
oradmin
(or a custom role with cms.builder.manage permission). - Recommended: enable Audit Logs in Settings → Monitoring for change tracking.
Core Concepts
Content Types
A content type is the blueprint. It defines fields, validations, locales, and workflow behavior. Types are versioned so you can evolve models safely over time.
Fields
Supported field kinds:
- Text (single line) & Rich Text (WYSIWYG with embeds)
- Number (int/float), Boolean
- Date, DateTime, Time, ISO Duration
- Enum (single) & Tags (multi-select)
- Media (image/video/file) with alt text, focal point, captions
- JSON (arbitrary object for advanced layouts)
- Slug (auto-generated from a source field, e.g., title)
Note: Praisma Hub avoids hard relational coupling to keep publishing flows fast and safe. Use IDs/lookup references (via JSON field or reference selectors) when you need lightweight linking between entries.
Create Your First Content Type
- Go to CMS → Builder and click New Type.
- Enter a Name (e.g., “Blog Post”) and optional Icon & Description.
- Choose if entries are localized (per locale fields) and whether to enable versioning.
- Add fields (see examples below) and set validations.
- Define workflow rules (who can move from draft to in_review, etc.).
- Click Create Type. The type becomes available in CMS → Content.
Example: “Blog Post” Model
{
"name": "Blog Post",
"version": 1,
"localized": true,
"fields": [
{ "key": "title", "type": "text", "required": true, "max": 120 },
{ "key": "slug", "type": "slug", "from": "title", "unique": true },
{ "key": "summary", "type": "text", "max": 300 },
{ "key": "body", "type": "richtext", "required": true, "embeds": ["image", "video", "quote"] },
{ "key": "heroImage", "type": "media", "mimes": ["image/*"], "altRequired": true },
{ "key": "tags", "type": "tags", "options": ["Product", "Tutorial", "News"] },
{ "key": "publishedAt", "type": "datetime" },
{ "key": "seo", "type": "json", "schema": { "title": "string", "description": "string" } }
],
"workflow": {
"states": ["draft","in_review","approved","scheduled","published","archived","rejected"],
"transitions": {
"draft": ["in_review"],
"in_review": ["approved","rejected"],
"approved": ["scheduled","published"],
"scheduled": ["published","archived"],
"published": ["archived"]
},
"permissions": {
"draft": ["editor","admin","owner"],
"in_review": ["editor","admin","owner"],
"approved": ["admin","owner"],
"published": ["admin","owner"]
}
}
}
Field Validations & Conditional Logic
Each field supports validations to guarantee quality and compliance:
- Presence: required / optional
- Length & Range: min/max characters, numeric bounds
- Pattern: regex for slugs, emails, etc.
- Media constraints: MIME type, max size, dimensions, aspect ratio
- Custom validators: tenant-level hooks to enforce brand rules
You can also define conditional visibility (e.g., show publishedAt only when status is scheduled or published).
Localization
Enable locales per type to author translations with fallbacks. Editors can switch locales in the entry editor. You may mark fields as localized (requires per-locale values) or global (shared across locales).
- Locales: e.g.,
nl
,en
,de
- Fallbacks: e.g.,
nl
→en
Versioning & Revisions
Every save creates a revision with author, timestamp, and diff. You can compare versions, restore a previous revision, and add notes for audit trails.
Workflows & Approvals
Praisma Hub ships with a default workflow aligned to enterprise editorial needs. Customize transitions and approvals per type:
- States: draft, in_review, approved, scheduled, published, archived, rejected
- Assignments: set owners/reviewers; require dual approval if needed
- SLAs: optional deadlines with reminders
Tip: Combine with Roles & Permissions to restrict who can approve or publish.
Calendar & Social Integration
When a type has a publishedAt
field or scheduling metadata, entries appear on the Calendar. From there, link content to Social Posts so campaigns and website updates stay coordinated.
API Access
Content is available via the API for your website/app. Standard endpoints:
GET /v1/cms/types
— list content typesGET /v1/cms/content/:type
— list entries of a typePOST /v1/cms/content/:type
— create entry (requires token)PATCH /v1/cms/content/:type/:id
— update entryPOST /v1/cms/content/:type/:id/publish
— move to published
GET /v1/cms/content/blog-post?locale=nl&status=published&limit=10
Field-Level Security
For sensitive content (e.g., legal notes), set field-level permissions so only specific roles can read/write a field. Non-authorized users will see masked values or the field will be hidden entirely.
Migrations & Safe Changes
- Draft changes to the type (adds/edits are non-breaking while entries adapt).
- Validate existing entries against the new schema (auto-fixes where possible).
- Promote the type version; audit log records who/when/what changed.
Removing fields marks them as deprecated first; data is retained until you confirm purge. This prevents accidental loss.
Modeling Examples
Landing Page Section
heading
(text, required)body
(richtext)ctaLabel
(text)ctaUrl
(text, pattern: URL)media
(image, min-width 1200px)theme
(enum: light/dark/brand)
Press Release
headline
(text, required, max 120)slug
(slug from headline, unique)body
(richtext, required)contactEmail
(text, pattern: email)embargoUntil
(datetime)attachments
(files)
Best Practices
- Keep models composable: prefer smaller types reused across pages.
- Use slug and publishedAt consistently for predictable URLs & scheduling.
- Guard with validations early to reduce QA overhead.
- Document editorial rules in the Description of fields to guide users.
Troubleshooting
- Field appears disabled: You may lack write permission; ask an admin.
- Can’t publish: The entry might still be in_review or missing required fields.
- Slug conflicts: Another entry uses the same slug in this locale; adjust the title or slug.
Next Steps
- Set up Roles & Permissions for your editorial team.
- Connect your website to the API and fetch published entries.
- Enable Monitoring & Logs for schema changes and content publishing.