⭐ 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.
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.
- 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
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:migrateAdmin reorder UI: /admin/pages/home/layout and /admin/pages/contact/layout.
make up
make test
make phpstan
make -C demo/symfony8 up
make demo-smokeDemo default URL: http://localhost:8127.
- Installation
- Configuration
- PSR evaluation (REQ-CS-007)
- Usage
- Contributing
- Code of Conduct
- Changelog
- Upgrading
- Release process
- Security
- Engram
- Spec-driven development
- GitHub Spec Kit
| 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-checkMIT — see LICENSE.
