netgen/layouts-ezplatform-site-api
Netgen Layouts integration for eZ Platform Site API, adding Site API-powered content sources and query support so you can build and manage layouts using eZ Platform content with straightforward configuration.
netgen/layouts (Symfony-based layout builder), ezsystems/ezplatform-site-api (now ibexa/site-api), and a supported PHP/eZ Platform version. Verify the composer.json require block against your app's locked versions before install — the package version you can use is dictated by the Layouts major you're on, not the reverse.composer require netgen/layouts-ezplatform-site-api
Add the bundle to config/bundles.php:
Netgen\Layouts\Ez\SiteApi\NetgenLayoutsEzSiteApiBundle::class => ['all' => true],
Ensure the Site API bundle (EzSystems\EzPlatformSiteApi\Bundle\EzPlatformSiteApiBundle) is registered before it — the integration consumes Site API services at container build time.vendor/: the bundle class, its DependencyInjection/ extension (Configuration.php + NetgenLayoutsEzSiteApiExtension.php), and any Resources/config/ service and YAML definition files. Layouts integrations are almost entirely configured by tagged services and netgen_layouts config, so the DI files tell you what value types, query types, and block definitions are actually available.find, filter, ContentService). This package is small; the real surface area is those two.Treat the package as three capabilities. In practice you'll interact with:
Content (or location) directly as a block value.find() / filtered queries instead of raw eZ search.Configure queries at the block-definition level, not in PHP. Layouts intends block queries to be configured in config/packages/netgen_layouts.yaml (and per-siteaccess where relevant). Keep query shape, content types, and limits in YAML so editors can adjust them in the admin UI without a deploy. Reserve code for custom query handlers only when Site API's filter DSL genuinely can't express the query.
Prefer Site API for reads inside layouts. Do not reach for ezpublish / ContentService inside a layout block if the Site API equivalent exists. The whole point of this integration is consistent resolution (content IDs + remote IDs, correct language/translation fallback, correct siteaccess root). Mixing the two leads to content resolving in some block configurations and not others.
Template integration. Wire your Site API content to rendering through eZ view configuration (ezplatform.yaml content-view / view-type rules) rather than hardcoding Twig paths in the block view_type. This keeps the layout's rendering consistent with the rest of the site and lets you reuse existing content views. Use the package's view type as the bridge; keep rendering logic in eZ views.
Multi-siteaccess discipline. Use netgen_layouts.system / siteaccess-aware configuration for things like root location IDs, content type restrictions, and view selection. This is where a "works locally, broken in prod" bug most often appears.
Cache/HTTP layer integration. Layouts emits its own cache tags; Site API content items participate in eZ's cache. If you add custom query handlers or value converters, propagate the relevant cache tags/invalidation keys — otherwise editors see stale blocks after publishing.
Extend via DI tags, not by monkey-patching. If you need a new block definition or query type, register it as a tagged service in your app and mirror what the bundle does in its Resources/config/. Layouts is designed to be extended this way; subclassing package classes is fragile across minor upgrades.
netgen/layouts, Site API, and this package as one unit. Lock all three with tight constraints and test on upgrade. Never let Composer float the Integration package alone.ezsystems/* package names; newer Ibexa installs use ibexa/*. Match namespaces and bundle class paths to your eZ Platform/Ibexa major or the bundle class won't autoload.netgen_layouts.yaml, block definitions, or view config, run bin/console cache:clear and clear the Layouts cache (admin "clear cache" action or netgen:layouts:clear-cache-style command if present in your Layouts version). Symfony cache alone often isn't sufficient because Layouts caches serialized layout structures.LocationQuery and root, and compare to the controller case.var/log/ with netgen_layouts logger channel; Site API query failures surface through its own logger. Turn both to debug when a block renders empty — the split between "query returned nothing" and "rendering failed for found content" is where most debugging time is spent.How can I help you explore Laravel packages today?