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

By the numbers ​

  • 19ready-made blocks in the kit, one stylesheet, no CSS framework
  • 38public interfaces a host implements or replaces
  • 1,551PHPUnit tests across the three packages
  • 589Vitest tests for the Stimulus controllers
  • 202Playwright tests, on MySQL and PostgreSQL
  • 6.4 β†’ 8Symfony versions in CI, on PHP 8.2 to 8.4

The builder ​

The editor works on your real page. A block's form sits in the sidebar, the page's preview beside it, and nothing reaches visitors before Publish.

The builder: a block's form in the sidebar, the page's real preview beside it
A section's sidebar, its layout panel open
Sections. Layout, widths, display per viewport: grid, slider, tabs or accordion.
The navigator floating over the preview
Navigator. The whole page as a tree: drag, duplicate, delete.
The page previewed at phone width
Every viewport. Preview on tablet and mobile, and reorder blocks there only.
The translation workbench
Translation. One layout, a value per language, previewed as you type.

The block kit ​

Each thumbnail is the block as your visitors get it, styled by the kit's stylesheet alone. Retheme it with seven CSS custom properties.

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

Try it live ​

A public demo runs the builder on a real page: blocks.clementmuller.fr. Edit, preview on every viewport, publish β€” no install needed.

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.

Made with passion ​

ContentBlocks is built and maintained by ClΓ©ment Muller, a freelance Symfony developer. I offer installation, integration and customization β€” custom blocks, theming to your design system, Sylius or legacy-app integration, content migration. Get in touch through clementmuller.fr.

Released under the MIT License.