General

  eZ Systems Website
  Editor documentation


  Developer documentation

  Back to the top

Skip to end of metadata
Go to start of metadata

Description

V1.2

A Landing Page has a customizable layout with multiple zones where you can place predefined blocks with content.

By default eZ Enterprise comes with a number of preset layouts. You can, however, add custom layouts with zones to your configuration.

Solution

Defining the layout

A Landing Page layout is composed of zones.

Zone structure

Each zone contains the following parameters:

NameDescription
<zone_id>Required. A unique zone ID
<name>Required. Zone name

Defining a zone layout

You can define a new layout file (e.g. in Twig) for a zone and include it in a Landing page layout.

A Zone is a container for blocks. The best way to display blocks in the zone is to iterate over a blocks array and render the blocks in a loop.

 For eZ Enterprise, the data-studio-zone attribute is required to allow dropping the Content into specific zones.

Example zone.html.twig

 

Creating and configuring layouts

In the Demo installation the layout configuration is stored in ezstudio-demo-bundle/Resources/config/default_layouts.yml:

Example default_layouts.yml

 

The following parameters need to be included in the settings of the default_layouts.yml file:

ParameterTypeDescriptionRequired

layouts

stringLayout config rootYes

number

stringUnique key of the layoutYes

{ID}/identifier

stringID of the LayoutYes

{ID}/name

stringName of the LayoutYes

{ID}/description

stringDescription of LayoutYes

{ID}/thumbnail

string<path> to thumbnail imageYes

{ID}/template

string

<path> to template View

For example:
eZStudioDemoBundle:layouts:1.html.twig

<bundle>:<directory>:<file name>

Yes

{ID}/zones

string

Collection of zones

Yes
{ID}/{zone}/zone_idstringID of the zoneYes
{ID}/{zone}/namestringZone nameYes