nowo-tech / page-layout-kit-bundle
Reusable Symfony page compositor: ordered typed blocks (hero, text, cards, list, cta, compare) with admin reorder and inline CMS modals.
Package info
github.com/nowo-tech/PageLayoutKitBundle
Type:symfony-bundle
pkg:composer/nowo-tech/page-layout-kit-bundle
Fund package maintenance!
Requires
- php: >=8.4 <8.6
- doctrine/doctrine-bundle: ^2.10 || ^3.0
- doctrine/orm: ^2.15 || ^3.0
- nowo-tech/form-kit-bundle: ^2.4
- nowo-tech/ui-kit-bundle: ^1.4
- symfony/config: ^7.4 || ^8.0
- symfony/dependency-injection: ^7.4 || ^8.0
- symfony/form: ^7.4 || ^8.0
- symfony/framework-bundle: ^7.4 || ^8.0
- symfony/http-foundation: ^7.4 || ^8.0
- symfony/http-kernel: ^7.4 || ^8.0
- symfony/routing: ^7.4 || ^8.0
- symfony/security-bundle: ^7.4 || ^8.0
- symfony/translation: ^7.4 || ^8.0
- symfony/twig-bundle: ^7.4 || ^8.0
- symfony/yaml: ^7.4 || ^8.0
- twig/extra-bundle: ^3.12
- twig/string-extra: ^3.12
- twig/twig: ^3.8
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- nowo-tech/phpstan-frankenphp: ^1.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-symfony: ^2.0
- phpunit/phpunit: ^11.0 || ^12.0 || ^13.0
- rector/rector: ^2.0
- vincentlanglet/twig-cs-fixer: ^4.0
Suggests
- nowo-tech/ckeditor5-editor-bundle: Rich text in block admin modals.
- symfony/flex: Automatic recipe installation
README
⭐ Found this useful? Give it a star on GitHub! It helps us maintain and improve the project.
Reusable Symfony page compositor for ordered, typed content blocks (hero, text, cards, list, cta, compare) with a secured admin reorder UI, inline CMS modals, Doctrine persistence, and Twig-based public rendering.
Compatible with Symfony 7.4+ and 8.x on PHP 8.4+
This bundle is FrankenPHP worker mode friendly.
What is this?
Page Layout Kit Bundle gives Symfony applications a reusable page-layout layer backed by Doctrine. Editors can manage ordered blocks for configured page keys such as home and contact, reorder them in the admin UI, and edit supported blocks through inline CMS modals. Public pages consume the resolved layout through services and Twig templates.
Features
- Ordered typed blocks:
hero,text,cards,list,cta,compare - Configurable page keys and locales with default fallback (
es,enby default) - Admin reorder UI at
/admin/pages/{pageKey}/layout - Inline modal editing endpoints for supported block types
- Public rendering via
PageBlockProvider,PageBlockView, and Twig templates - Legacy fallback and migration command for pre-block JSON/content sources
- Doctrine entities, repositories, and optional table prefixing
- Configurable access guard: roles, custom checker, or demo-only unauthenticated mode
- Optional HTML sanitization for rich-text blocks (
html.sanitize:none,strip,allowlist,service) - Twig namespace
NowoPageLayoutKitBundlewith host override precedence - Symfony Flex recipe and FrankenPHP demo in
demo/symfony8
Quick start
composer require nowo-tech/page-layout-kit-bundle:^1.0 composer require twig/extra-bundle twig/string-extra
# config/packages/nowo_page_layout_kit.yaml nowo_page_layout_kit: default_locale: es locales: [es, en] pages: [home, contact] security: access_roles: [ROLE_EDITOR]
# config/routes/nowo_page_layout_kit.yaml nowo_page_layout_kit: resource: '@NowoPageLayoutKitBundle/Resources/config/routing.yaml'
php bin/console doctrine:migrations:diff php bin/console doctrine:migrations:migrate
Admin reorder UI: /admin/pages/home/layout and /admin/pages/contact/layout.
Development
make up
make test
make phpstan
make -C demo/symfony8 up
make demo-smoke
Demo default URL: http://localhost:8127.
Documentation
- Installation
- Configuration
- Usage
- Contributing
- Code of Conduct
- Changelog
- Upgrading
- Release process
- Security
- Engram
- Spec-driven development
- GitHub Spec Kit
Additional documentation
Tests and coverage
| Area | Status | Command |
|---|---|---|
PHP src/ coverage target |
≥99% (CI gate) | make test-coverage |
| Unit and bundle QA | Enabled | make test |
| Full release checks | Enabled | make release-check |
make test
make test-coverage
make release-check
License
MIT — see LICENSE.
