General

  eZ Systems Website
  Technical documentation
  Editor documentation

This Documentation contains:
 
Technical documentation:



⚠ WARNING ! This documentation is deprecated !

Please go to the current Technical Documentation

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: corrected panel formatting
Panel
bgColor#f58220
titleBGColor#f0f0f0

This page describes features available only in eZ Studio.

The eZLandingPageFieldType represents an editable page that can be built from defined set of blocks.

The user can use them to build a dynamic page. The configuration of layout and blocks is stored in the default_layouts.yml file.

Panel
bgColor#FFFFFF
titleBGColor#dddddd
titleIn this topic
 

Table of Contents
maxLevel3

Layout configuration

The layout configuration is stored in the default_layouts.yml file with the following structure below:

 

In eZ Publish (legacy) you could configure a layout in the ( DemoBundle / Resources / config / ezpage.yml) file. 

Example of settings:

In eZ Studio you can configure a layout in the  ezstudio-demo-bundle / Resources / config / default_layouts.yml file.

Example of settings:

Panel

Page FieldType                                          

Code Block
languageruby
themeConfluence
ezpage:
    # List of zone layouts provided by the DemoBundle
    # Zone layouts are used when rendering an ezpage field.
    # See "ezpage_field" block in EzPublishCoreBundle::content_fields.html.
    # A concrete example can be found in eZDemoBundle:full:landing_page.html.twig
    layouts:
        GlobalZoneLayout:
            name: Global zone layout
            template: "eZDemoBundle:zone:globalzonelayout.html.twig"
        2ZonesLayout1:
            name: 2 zones (layout 1)
            template: "eZDemoBundle:zone:2zoneslayout1.html.twig"
        2ZonesLayout2:
            name: 2 zones (layout 2)
            template: "eZDemoBundle:zone:2zoneslayout2.html.twig"
        2ZonesLayout3:
            name: 2 zones (layout 3)
            template: "eZDemoBundle:zone:2zoneslayout3.html.twig"
        3ZonesLayout1:
            name: 3 zones (layout 1)
            template: "eZDemoBundle:zone:3zoneslayout1.html.twig"
        3ZonesLayout2:
            name: 3 zones (layout 2)
            template: "eZDemoBundle:zone:3zoneslayout2.html.twig"

    enabledLayouts:
        - GlobalZoneLayout
        - 2ZonesLayout1
        - 2ZonesLayout2
        - 2ZonesLayout3
        - 3ZonesLayout1
        - 3ZonesLayout2
Panel

LandingPage FieldType

Code Block
languageruby
themeConfluence
layouts:
    1:	
		identifier: 1						
        name: One column
        description: 'One column'
        thumbnail: '/bundles/ezstudiodemo/images/layouts/1.png'
        template: eZStudioDemoBundle:layouts:1.html.twig
        zones:
            first:
                name: First zone

    1_2:
		identifier: 1_2	
		name: Two zones in columns, narrow left, wide right
        description: Two zones in columns, narrow left, wide right
        thumbnail: '/bundles/ezstudiodemo/images/layouts/1_2.png'
        template: eZStudioDemoBundle:layouts:1_2.html.twig
        zones:
            first:
                name: First zone
            second:
                name: Second zone

    1_2__1:	  
		identifier: 1_2__1
        name: Three zones, two columns, narrow left, wide right in first row and one row
        description: Three zones, two columns, narrow left, wide right in first row and one row
        thumbnail: '/bundles/ezstudiodemo/images/layouts/1_2__1.png'
        template: eZStudioDemoBundle:layouts:1_2__1.html.twig
        zones:
            first:
                name: First zone
            second:
                name: Second zone
            third:
                name: Third zone

 

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

 

Configuring Blocks

The configuration of blocks is stored in the default_layouts.yml file with the following structure below:

Panel

In eZ Publish/Platform you could configure blocks in the FieldType ( DemoBundle / Resources / config / ezpage.yml)                                     

Code Block
languageruby
themeConfluence
blocks:
        Campaign: { name: Campaign }
        MainStory: { name: Main story }
        ContentGrid: { name: Content Grid }
        Gallery: { name: Gallery }
        Banner: { name: Banner }
        Video: { name: Video }
        TagCloud: { name: Tag cloud }
        Poll: { name: Poll }
        ItemList: { name: Item list }
        FeedReader: { name: Feed reader }
        FeedbackForm: { name: Feedback Form }
        HighlightedItem: { name: Highlighted Item }

    enabledBlocks:
        - Campaign
        - MainStory
        - ContentGrid
        - Gallery
        - Banner
        - Video
        - TagCloud
        - Poll
        - ItemList
        - FeedReader
        - FeedbackForm
        - HighlightedItem
Panel

In eZ Studio you can configure blocks in the LandingPage Field Type ( ezstudio-demo-bundle / Resources / config / default_layouts.yml)                                 

Code Block
languageruby
themeConfluence
blocks:
    contentlist:
        views:
            'contentlist':
                'template': 'eZStudioDemoBundle:blocks:contentlist.html.twig'
                'name': 'Studio Demo contentlist'

            'schedule_hero':
                'template': 'eZStudioDemoBundle:blocks:schedule_hero.html.twig'
                'name': 'Studio Demo schedule hero'

    banner:
        views:
            'banner':
                'template': 'eZStudioDemoBundle:blocks:banner.html.twig'
                'name': 'Studio Demo banner'

            'banner_container':
                'template': 'eZStudioDemoBundle:blocks:banner_container.html.twig'
                'name': 'Studio Demo banner in container div'

    embed:
        views:
            'embed':
                'template': 'eZStudioDemoBundle:blocks:embed.html.twig'
                'name': 'Studio Demo embed block'

            'blog':
                'template': 'eZStudioDemoBundle:blocks:blog.html.twig'
                'name': 'Studio Demo blog block'