klehm/content-blocks-kit

Ready-to-use block types for ContentBlocks (Text, Title, Image, Tabs).

Maintainers

Package info

github.com/Klehm/content-blocks-kit

Homepage

Issues

Type:symfony-bundle

pkg:composer/klehm/content-blocks-kit

Statistics

Installs: 9

Dependents: 0

Suggesters: 0

Stars: 0

v0.1.0-alpha.11 2026-05-19 16:29 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.4 for overrides to take priority. Earlier versions manually registered the vendor templates/ path under @ContentBlocksKit, which shadowed the host's templates/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