Landing Page Field Type represents a page with a layout consisting of multiple zones; each of which can in turn contain blocks.
Name | Internal name | Expected input |
---|
Landing page | ezlandingpage | string (JSON) |
Layout and zones
Layout is the way in which a Landing Page is divided into zones. Zones are organized structures that are deployed over a layout in a particular position.
The placement of zones is defined in a template which is a part of the layout configuration. You can modify the template in order to define your own system of zones.
For information on how to create and configure new blocks for the Landing Page, see Creating Landing Page layouts (Enterprise).
Blocks
For information on how to create and configure new blocks for the Landing Page, see Creating Landing Page blocks (Enterprise).
Rendering Landing Pages
Landing page rendering takes place while editing or viewing.
When rendering a Landing Page, its zones are passed to the layout as a zones
array with a blocks
array each. You can simply access them using twig (e.g. {{ zones[0].id }}
).
To render a block inside the layout, use twig render_esi()
function to call
ez_block:renderBlockAction
.
An action has the following parameters:
contentId
– ID of content which can be accessed by
contentInfo.id
blockId
– ID of block which you want to render
Example usage:
As a whole a sample layout could look as follows:
Viewing template
Your view is populated with data (parameters) retrieved from the getTemplateParameters()
method which must be implemented in your block's class.
Example: