PHPackages                             se7enxweb/explayouts - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. se7enxweb/explayouts

ActiveEzpublish-legacy-extension

se7enxweb/explayouts
====================

Exponential Layouts - Netgen Layouts inspired visual page builder for Exponential Legacy / Exponential 6

10PHP

Since Jul 31Pushed yesterdayCompare

[ Source](https://github.com/se7enxweb/explayouts)[ Packagist](https://packagist.org/packages/se7enxweb/explayouts)[ RSS](/packages/se7enxweb-explayouts/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Exponential Layouts
===================

[](#exponential-layouts)

General description
-------------------

[](#general-description)

Exponential Layouts (`explayouts`) is a visual page builder for Exponential 6 / Exponential Legacy. It is the main integration extension of the Exponential Layouts suite: it owns the `explayouts_*` database tables, renders layouts, zones and blocks on the frontend, resolves which layout applies to a request via mapping rules, and adds a "Layouts" tab to the admin content view.

It is an Exponential Legacy port inspired by the `netgen/layouts-ibexa` package. Instead of Symfony services and Doctrine, it uses `eZPersistentObject` value classes, INI-driven block/layout type definitions (`explayouts.ini`) and legacy module views.

This extension provides the following capabilities:

- Layout persistence - Store layouts, zones, blocks, block parameters, collections, collection items and mapping rules in dedicated `explayouts_*` database tables, with draft and published statuses.
- Layout resolving - Decide which layout applies to a request path or content node through prioritized mapping rules with targets and conditions, with a configurable fallback layout.
- Frontend rendering - Prepare a complete layout/zone/block tree for template rendering and ship the layout, zone and block view templates that render it.
- Block handlers - Around 25 built-in, INI-wired block handlers (text, title, HTML, image, list, grid, gallery, carousel, map, video and more), all implementing a single simple interface.
- Dynamic collections - Attach manual or query-driven content collections to blocks (children, parent, subtree, siblings, latest, random, manual and pluggable custom query types).
- Admin integration - A legacy admin module with dashboard, layout/rule/block editors, preview, setup and template editor screens, plus a "Layouts" tab on the admin content node view.
- Template fetch functions - Resolve and load layouts directly from templates via the `explayouts` module fetch functions.
- Import / export - Transfer layouts and mapping rules between installations.
- CLI tooling - Command line helpers for schema installation, base data seeding, listing, publishing and diagnostics.

Features
--------

[](#features)

The following features are provided by the Exponential Layouts extension:

- Persistent value objects - `expLayoutsLayout`, `expLayoutsZone`, `expLayoutsBlock` and `expLayoutsBlockParameter` model the layout tree; `expLayoutsCollection` and `expLayoutsCollectionItem` model block collections (manual and dynamic); `expLayoutsRule`, `expLayoutsRuleTarget` and `expLayoutsRuleCondition` model the layout resolver rules. All are `eZPersistentObject` classes mapped to the `explayouts_*` schema.
- Layout resolver - `expLayoutsResolver::resolve()` resolves the layout for the current request URI, an explicit path or a content node, evaluating enabled rules by priority and falling back to `explayouts.ini` `[ResolverSettings] DefaultLayout` when no rule matches.
- Renderer - `expLayoutsRenderer::prepareLayout()` turns a layout into a ready-to-render array (id, identifier, name, layout\_type, zones each with their blocks, block\_count) consumed by the shipped layout templates.
- INI-defined layout types - `expLayoutsLayoutType` reads `LayoutType_*` definitions and their zones from `explayouts.ini`. Shipped layout types: `1_column`, `2_column`, `3_column`, `4_column`, `hero`, `sidebar_left`, `sidebar_right`, `featured`, `mosaic`.
- INI-defined block definitions - `expLayoutsBlockHandlerFactory` instantiates block handlers from `explayouts.ini` `BlockDefinition_*` sections. Around 25 built-in handlers ship with the extension (`expLayoutsTextBlockHandler`, `expLayoutsTitleBlockHandler`, `expLayoutsHtmlBlockHandler`, `expLayoutsImageBlockHandler`, `expLayoutsListBlockHandler`, `expLayoutsSingleBlockHandler`, `expLayoutsButtonBlockHandler`, `expLayoutsCardBlockHandler`, `expLayoutsGridBlockHandler`, `expLayoutsGalleryBlockHandler`, `expLayoutsCarouselBlockHandler`, `expLayoutsMapBlockHandler`, `expLayoutsVideoBlockHandler` and more), all implementing `expLayoutsBlockHandlerInterface`.
- Dynamic collection query handlers - `expLayoutsQueryHandlerFactory` instantiates the query handlers behind dynamic collections: `children`, `parent`, `subtree`, `siblings`, `latest`, `random`, `manual`, plus pluggable query types such as `exp_content_relation_list`, `exp_content_reverse_relation_list` and `exp_content_tags` provided by sibling extensions.
- Template fetch functions - `layout`, `resolve_layout`, `resolve_layout_for_node` and `rules_for_node` on the `explayouts` module make layout resolution available to any template, including `pagelayout.tpl`.
- Legacy admin module - `modules/explayouts` provides dashboard, layout list/edit, block edit, rule list/edit, preview, setup and template editor views.
- Admin content view integration - `settings/admininterface.ini.append.php` adds the "Layouts" tab to the admin node view window controls, showing the layouts and rules that apply to the node.
- Import / export - `expLayoutsImporter` and `expLayoutsExporter` transfer layouts and rules; used by the transfer endpoints of `explayouts_ui_api` and the Import screen of `explayouts_ui`.
- Multi-database schema - `sql/` ships the schema for MySQL/MariaDB, SQLite and PostgreSQL (plus an experimental MongoDB schema description).
- Installation and demo data - `expLayoutsInstall` and `expLayoutsFixtures` handle schema installation and demo data seeding.
- CLI helpers - `bin/php/` contains command line scripts such as `install_base_data.php`, `layout_list.php`, `layout_publish.php`, `layout_info.php` and `diagnose.php`.
- Frontend templates - `design/standard/templates/explayouts/` ships `layout.tpl`, `zone.tpl` and the per-type layout templates in `layouts/` (e.g. `2_column.tpl`), all overridable through the design cascade.
- Customization layers - Every shipped INI setting can be overridden through the standard INI cascade, every template through the design override cascade, and new blocks/queries are added purely in your own extension via the handler interfaces (see [doc/USAGE.md](doc/USAGE.md)).

Version
-------

[](#version)

- The current version of Exponential Layouts is 1.0.0
- Last Major update: July 30, 2026

Copyright
---------

[](#copyright)

- Exponential Layouts is copyright 1998 - 2026 7x
- See: [LICENSE.md](LICENSE.md) for more information on the terms of the copyright and license

License
-------

[](#license)

Exponential Layouts is licensed under the GNU General Public License.

The complete license agreement is included in the [LICENSE.md](LICENSE.md) file.

Exponential Layouts is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License or at your option a later version.

Exponential Layouts is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

The GNU GPL gives you the right to use, modify and redistribute Exponential Layouts under certain conditions. The GNU GPL license is distributed with the software, see the file LICENSE.md.

It is also available at

You should have received a copy of the GNU General Public License along with Exponential Layouts in LICENSE.md. If not, see .

Using Exponential Layouts under the terms of the GNU GPL is free (as in freedom).

For more information or questions please contact

Requirements
------------

[](#requirements)

The following requirements exists for using the Exponential Layouts extension:

Exponential version

- Make sure you use Exponential 6 / eZ Publish Legacy (required) or higher.

PHP version

- Make sure you have PHP 8.1 or higher.

Database server

- Make sure you have MySQL/MariaDB, SQLite or PostgreSQL available; the extension ships a schema for each in its `sql/` directory.

Sibling extensions (optional, for the full suite)

- `explayouts` works standalone for rendering and resolving. For the full suite also activate:
    - `explayouts_core` — service layer used by the admin UIs
    - `explayouts_standard` — additional standard block handler set
    - `explayouts_ui` — legacy admin module and assets
    - `explayouts_ui_api` — modern SPA admin app and JSON API
    - `explayouts_api` — content adapters for pickers/integration

Installation
------------

[](#installation)

In short: place the extension in `extension/explayouts`, activate it via `site.ini` `[ExtensionSettings] ActiveExtensions[]` (or per siteaccess via `ActiveAccessExtensions[]`), import the database schema for your database from the `sql/` directory (this creates the `explayouts_*` tables: layout, zone, block, block\_parameter, collection, collection\_item, collection\_query, rule, rule\_target, rule\_condition), optionally seed base data with `php extension/explayouts/bin/php/install_base_data.php`, then regenerate autoloads and clear all caches.

See [INSTALL.md](INSTALL.md) for the full step-by-step installation instructions, including the settings shipped with the extension (`explayouts.ini`, `module.ini`, `design.ini`, `menu.ini`, `admininterface.ini`).

Usage
-----

[](#usage)

The extension is used from three sides: PHP code, templates and the admin interface.

Key classes:

ClassPurpose`expLayoutsLayout`, `expLayoutsZone`, `expLayoutsBlock`, `expLayoutsBlockParameter`Persistent value objects for layouts, zones, blocks and block parameters`expLayoutsCollection`, `expLayoutsCollectionItem`Block collections and their items (manual and dynamic)`expLayoutsRule`, `expLayoutsRuleTarget`, `expLayoutsRuleCondition`Layout resolver rules, targets and conditions`expLayoutsResolver`Resolves the layout for a request path or node (`resolve()`)`expLayoutsRenderer`Prepares a layout/zone/block tree for template rendering (`prepareLayout()`)`expLayoutsBlockHandlerFactory`Instantiates block handlers from `explayouts.ini` `BlockDefinition_*` sections`expLayoutsQueryHandlerFactory`Instantiates dynamic collection query handlers (children, parent, subtree, siblings, latest, random, manual)`expLayoutsLayoutType`Reads `LayoutType_*` definitions and their zones from `explayouts.ini``expLayoutsImporter`, `expLayoutsExporter`Transfer (import/export) of layouts and rules`expLayoutsInstall`, `expLayoutsFixtures`Schema installation and demo dataResolving a layout in PHP:

```
