Is the naming of Ibexa DXP Page Builder zones suitable for contributors?

zones-custom-ibexa-stackable.png

19 Sept 2025

Zones in Ibexa Page Builder

Within the Ibexa DXP Page Builder, you define the layout of your pages by declaring content zones. Blocks are then dragged and dropped into these zones to build the page progressively, block by block.

Here's an example of a zone configuration within an Ibexa YAML file:

        dlayout_three_rows_two_columns:
            identifier: 'layout_three_rows_two_columns'
            name: 'Three rows, two columns'
            description: 'Three rows, two columns'
            thumbnail: '/bundles/ibexadashboard/img/layouts/three_rows_two_columns.svg'
            template: '@ibexadesign/dashboard/builder/layouts/three_rows_two_columns.html.twig'
            zones:
                top:
                    name: 'top'
                middle_left:
                    name: 'middle-left'
                middle_right:
                    name: 'middle-right'
                bottom:
                    name: 'bottom'

The “top” zone is named “top”, but this name doesn't appear anywhere in the Page Builder's page editing interface; it is identified as Drop zone 1:

dashboard-edition-zones.png

The same principle applies in the Structure view (which is very useful for moving blocks from one zone to another): zones are identified as Drop zone 1, 2, 3, and so on:

treemenu.png

What's the point of assigning a specific name in the configuration if that name isn't used anywhere?

How is the zone name displayed?

Zone names are displayed in JavaScript by the following scripts:

  • ibexa/page-builder/src/bundle/ui-dev/src/modules/page-builder/page.builder.js
  • ibexa/page-builder/src/bundle/ui-dev/src/modules/page-builder/components/structure/structure.tree.js
const hasFieldset = zone.querySelector('fieldset') !== null;

if (!hasFieldset) {
    const dropZoneLabel = Translator.trans(
        /*@Desc("Drop zone %number%")*/ 'structure.drop.zone',
        {
            number: index + 1,
        },
        'ibexa_page_builder',
    );
    const fieldset = document.createElement('fieldset');
    const legend = document.createElement('legend');

It's hard to translate a text string when its label changes for each zone. In the page.builder.js script, we can see that if a <fieldset> element is already present in the zone's DOM, it isn't recreated.

Without getting into overly complex development or a kernel hack, we should be able to add this HTML block to our layout template to name our zones properly.

Ensuring intuitive zone names

In our three_rows_two_columns.html.twig template, we therefore added the <fieldset> and <legend> elements with the zone name configured in our YAML file.

<div class="ibexa-db-zones">
    <div class="ibexa-db-zones__row">
        <div class="ibexa-db-zones__zone" data-ibexa-zone-id="{{ zones[0].id }}">
            <fieldset class="m-page-builder__fieldset">
                <legend class="m-page-builder__legend"
                        style="background-color: white; padding: 3px; border-radius: 5px; border: 1px dashed #4191ff;"
                >
                    {{ zones[0].name }}
                </legend>
            </fieldset>

            {% if zones[0].blocks %}
                ...

            {% endif %}
        </div>
    </div>
    <div class="ibexa-db-zones__row ibexa-db-zones__row--double">
        <div class="ibexa-db-zones__zone" data-ibexa-zone-id="{{ zones[1].id }}">
            <fieldset class="m-page-builder__fieldset">
                <legend class="m-page-builder__legend"
                        style="background-color: white; padding: 3px; border-radius: 5px; border: 1px dashed #4191ff;"
                >
                    {{ zones[1].name }}
                </legend>
            </fieldset>
            {% if zones[1].blocks %}

                ...

            {% endif %}
        </div>
    </div>
</div>
zone-renames.png

The preview zones are now self-explanatory and much easier to understand, especially in complex editorial management cases, such as the following example:

zones-custom-ibexa-stackable.png

Without explicit zone names, the editorial team can't distinguish between a Cover zone, a zone with stackable blocks (which we'll discuss in a future article) and a free zone where blocks are displayed one below the other.

Any ideas on how to promote this feature, which should be native in the Structure view? I'm calling on the Ibexa team to bring us this small improvement with Ibexa 5.

Update of 16 October

We continued development and created a hack to get all the zones displayed with the desired name. Voilà!

If you would like to know more, please do not hesitate to contact us.