Skip to content

ContentBlocksA page builder that lives inside your Symfony app

Build content areas from sections, columns and blocks — in-context, with live preview. Framework-native, extensible, no CMS lock-in.

ContentBlocks

Install in two commands

bash
composer require klehm/content-blocks klehm/content-blocks-kit
php bin/console doctrine:migrations:diff && php bin/console doctrine:migrations:migrate

Then attach a ContentArea to your entity, add ContentAreaType to a form, and call cb_render_content_area() in your template. The Quick start walks through the whole path in five minutes.

The mental model

ContentArea  →  Section  →  Column  →  Block
 (container)    (layout)    (preset)   (type + JSON data)

ContentArea is a titleless, slug-less container. The host app brings its own entity (a Page, a Product…) with a OneToOne to a ContentArea. That single design choice is why ContentBlocks drops into an existing app instead of asking you to migrate into a CMS.

What it does — and what it deliberately doesn't

✅ ContentBlocks does❌ ContentBlocks does not
Store structured content (sections / columns / blocks) as your dataOwn your routing, URLs, or SEO
Render an in-context builder with live previewShip a CMS, admin panel, or user management
Provide an extensible block-type systemForce a CSS framework (Tailwind/Bootstrap) on you
Enforce your auth model via a thin interfaceKnow who your users are — you wire that
Draft / publish / discard content statesReplace your templating — you keep full control of markup

Built for humans and agents

Installing is a short, deterministic path — and it's documented for AI coding agents too. See AGENTS.md and the machine-readable llms.txt index.

Released under the MIT License.