klehm / content-blocks-kit
Ready-to-use block types for ContentBlocks (Text, Title, Image, Tabs).
Package info
github.com/Klehm/content-blocks-kit
Type:symfony-bundle
pkg:composer/klehm/content-blocks-kit
Requires
- php: >=8.2
- klehm/content-blocks: @dev
- symfony/form: ^6.4 || ^7.0 || ^8.0
- symfony/framework-bundle: ^6.4 || ^7.0 || ^8.0
- symfony/mime: ^6.4 || ^7.0 || ^8.0
- symfony/security-csrf: ^6.4 || ^7.0 || ^8.0
- symfony/validator: ^6.4 || ^7.0 || ^8.0
Requires (Dev)
- phpunit/phpunit: ^11.0
This package is auto-updated.
Last update: 2026-05-19 16:29:19 UTC
README
Ready-to-use block types for klehm/content-blocks.
Included blocks
| Type | Class |
|---|---|
text |
TextBlock |
title |
TitleBlock |
image |
ImageBlock |
tabs |
TabsBlock |
Installation
composer require klehm/content-blocks klehm/content-blocks-kit
The blocks are auto-registered via Symfony autoconfiguration (#[AsContentBlock] attribute) — no extra configuration needed.
Overriding block templates
Drop a file at the matching relative path under templates/bundles/ContentBlocksKitBundle/ to override any template shipped by this kit — e.g. templates/bundles/ContentBlocksKitBundle/block/image/view.html.twig overrides the image view, templates/bundles/ContentBlocksKitBundle/form/image_theme.html.twig overrides the upload widget.
Requires
klehm/content-blocks-kit >= 0.1.0-alpha.4for overrides to take priority. Earlier versions manually registered the vendortemplates/path under@ContentBlocksKit, which shadowed the host'stemplates/bundles/ContentBlocksKitBundle/directory.
File uploads
ImageBlock requires a FileStorageInterface implementation. The kit ships with LocalFileStorage:
# config/services.yaml ContentBlocks\Storage\FileStorageInterface: class: ContentBlocks\Storage\LocalFileStorage arguments: $uploadDir: '%kernel.project_dir%/public/uploads/content-blocks' $publicPrefix: '/uploads/content-blocks'
Documentation & contributing
Full documentation and development setup live in the monorepo: github.com/klehm/content-blocks-project
License
MIT