masilia / ibexa-blocks
Front-office rendering of pages made of blocks for Ibexa DXP: a content model for templates, field renderers, themes that extend each other, and the pieces every theme shares
Package info
github.com/MasiliaLabs/ibexa-blocks
Type:ibexa-bundle
pkg:composer/masilia/ibexa-blocks
Requires
- php: >=8.3
- ibexa/core: ^5.0
- psr/container: ^1.1 || ^2.0
- psr/log: ^3.0
- symfony/config: ^7.4
- symfony/console: ^7.4
- symfony/dependency-injection: ^7.4
- symfony/http-foundation: ^7.4
- symfony/http-kernel: ^7.4
- symfony/routing: ^7.4
- symfony/yaml: ^7.4
- twig/twig: ^3.0
Requires (Dev)
- phpunit/phpunit: ^11.5
- symfony/form: ^7.4
- symfony/mailer: ^7.4
- symfony/mime: ^7.4
- symfony/validator: ^7.4
Suggests
- doctrine/doctrine-migrations-bundle: The migration of the newsletter table
- doctrine/orm: The newsletter subscribers (masilia_ibexa_blocks.newsletter)
- gregwar/captcha-bundle: A captcha on the contact forms
- ibexa/fieldtype-matrix: Matrix fields
- ibexa/rich-text: Renders rich text fields
- masilia/editorial-toolbox: In-context editing: the page and its blocks are marked for it
- masilia/ibexa-ai-craft: The assistant builds pages with the blocks of the theme and reads the conventions of this package
- masilia/ibexa-sites: Sets the layout, name, email and address of each site from its registry
- novactive/ezmenumanagerbundle: Menus managed in the admin (NovactiveMenuProvider)
- symfony/form: Contact forms made from a matrix of questions
- symfony/mailer: Contact forms, form submissions and the newsletter
- symfony/mime: Emails of the contact forms and the newsletter
- symfony/validator: Contact forms made from a matrix of questions
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-18 00:14:41 UTC
README
Front-office rendering of pages made of blocks for Ibexa: a content model for templates, themes that extend each other, and the pieces every theme shares.
masilia/ibexa-blocks is part of a family of packages for Ibexa that work together or alone. See the other packages.
What it is
The front office of an Ibexa site whose pages are made of blocks. A page holds an ordered list of block contents; each block is rendered by a Twig template named after its content type. This package gives templates what they need — a flat, ready-to-use content model — and the pieces every theme shares, so a theme is assets plus templates and nothing else.
Features
- Themes that extend each other: a theme is a folder of templates (
blocks/<type>.twig,cards/<type>.twig,full/<type>.twig…) and atheme.yaml. What a theme does not write comes from the next theme of the design (Ibexa's design engine chain). - One controller renders every page and block; behaviour that differs by block type is a provider, not an
if. - A content model for templates: each field of a block becomes a Twig variable, with value objects for images (and their variations), files, links, text and coordinates.
- The site around the page: layout configuration, menus, languages switcher and full views.
- List blocks: automatic items (the latest of a type), featured items and "all posts", driven by configuration.
- Search (
/searchand JSON endpoints) with sorts, facets and popular searches. - Forms by mail: contact forms built from a matrix of questions, mailed to the recipients the block names.
- Newsletter with double opt-in (
/api/subscribe, confirmation and unsubscribe links,app_subscribertable). - Theme tooling:
masilia:blocks:themes,masilia:blocks:theme:check,masilia:blocks:theme:create. - Contracts (
Themes,ShownViews,Subscribers,ListPreview…) for the packages that build on it.
Requirements
- PHP 8.3 or later
- Ibexa 5.0 (Symfony 7.4)
Works better with (optional):
masilia/ibexa-sitessets the layout, name and contact of each site from its registrymasilia/editorial-toolboxin-context editing: pages and blocks are marked for itmasilia/ibexa-ai-craftthe assistant builds pages with your blocks
Installation
composer require masilia/ibexa-blocks
-
Enable the bundle in
config/bundles.php:Masilia\Bundle\IbexaBlocks\MasiliaIbexaBlocksBundle::class => ['all' => true],
-
Import the routes. Load them before Ibexa's own, which has a
/searchof its own (files ofconfig/routes/are read in alphabetical order, so a name that sorts first works, e.g.app_masilia_ibexa_blocks.yaml):masilia_ibexa_blocks: resource: '@MasiliaIbexaBlocksBundle/Resources/config/routing.yaml' masilia_ibexa_blocks_newsletter: # only if you use the newsletter resource: '@MasiliaIbexaBlocksBundle/Resources/config/routing_newsletter.yaml'
-
If you use the newsletter, create its table (
doctrine/ormanddoctrine/doctrine-migrations-bundleare needed for that part):php bin/console doctrine:migrations:migrate
Configuration
masilia_ibexa_blocks: conventions: page_type: page # the content type of a page blocks_field: blocks # the field of a page that holds its blocks items_field: items # the field of a block that holds its child items items_field_by_type: # block types that call it differently info_cards: cards system: my_site_group: layout_remote_id: my_layout_config # the layout of the site (logo, footer) blocks: flatten_fields: true # each field is a Twig variable lists: auto_items: { types: [grid_cards, slider] } featured: { types: [grid_cards] } all_posts: { types: [all_posts] } search: allowed_content_types: [article, page] default_content_types: [article] forms: content_types: [steps_form] from_address: contact@example.org newsletter: enabled: true from_address: contact@example.org
Every key has a default; the full tree is bin/console config:dump-reference masilia_ibexa_blocks. If you use masilia/ibexa-sites, the layout of each site is read from its registry instead of system:.
A theme
templates/themes/my_site/
theme.yaml
blocks/hero_banner.twig
cards/card_item.twig
full/page.twig
# theme.yaml assets: { directory: assets/themes/my_site, entry: my_site, styles: [fa-icons] } favicons: build/images/my_site/icons fonts: ['https://fonts.googleapis.com/css2?family=Inter&display=swap']
Templates are found by the name of their content type; theme.yaml only needs views: for an exception. php bin/console masilia:blocks:theme:check <design> tells you which block type has no template, and masilia:blocks:themes --json gives your Encore build the entries to compile.
Tests
composer install vendor/bin/phpunit
The Masilia packages
| Package | What it does |
|---|---|
masilia/ibexa-admin-kit |
React components in the design of the Ibexa admin, for admin pages |
masilia/ibexa-sites |
A registry of sites that Ibexa serves without a deploy |
masilia/ibexa-ai |
The AI assistant for Ibexa: capabilities, providers, chat, approval flow |
masilia/ibexa-ai-craft |
The assistant builds sites and pages out of blocks |
masilia/ibexa-ai-editor |
AI suggestions and image generation in the content editing form |
masilia/ibexa-blocks |
Front-office rendering of pages made of blocks, with themes |
masilia/editorial-toolbox |
In-context editing toolbar for the front office |
What requires what (Composer installs it for you):
ibexa-sitesrequiresibexa-admin-kitibexa-airequiresibexa-admin-kitibexa-ai-editorrequiresibexa-aiibexa-ai-craftrequiresibexa-ai,ibexa-blocksandibexa-sitesibexa-blocksandeditorial-toolboxrequire none of the others; they are happy to findibexa-sites(and each other) when installed.
Compatibility
| Package version | PHP | Ibexa |
|---|---|---|
latest |
8.3+ | 5.0 |
Download
- Composer (recommended):
composer require masilia/ibexa-blocks— ibexa-blocks on Packagist - Archive of a release: GitHub releases (each release lists what changed)
- Source:
git clone https://github.com/MasiliaLabs/ibexa-blocks.git - What changed between versions: CHANGELOG.md
Support, contributing and security
- Questions and bug reports: GitHub issues
- Pull requests are welcome, see CONTRIBUTING.md
- Security problems: please follow SECURITY.md and do not open a public issue
License
Released under the MIT license. Copyright © 2026 MasiliaLabs.
Ibexa itself is distributed under its own licenses (Ibexa OSS: GPL-2.0), which apply to the project that uses this package. This package is an independent project, not affiliated with or endorsed by Ibexa AS; "Ibexa" is a trademark of its owner.