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:
Name | Description |
---|
<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.
Creating and configuring layouts
In the Demo installation the layout configuration is stored in ezstudio-demo-bundle/Resources/config/default_layouts.yml:
The following parameters need to be included in the settings of the default_layouts.yml file:
Parameter | Type | Description | Required |
---|
layouts | string | Layout config root | Yes |
number | string | Unique key of the layout | Yes |
{ID}/identifier | string | ID of the Layout | Yes |
{ID}/name | string | Name of the Layout | Yes |
{ID}/description | string | Description of Layout | Yes |
{ID}/thumbnail | string | <path> to thumbnail image | Yes |
{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_id | string | ID of the zone | Yes |
{ID}/{zone}/name | string | Zone name | Yes |