Skip to the content
Documentation

EzLandingPageFieldTypeBundle Configuration: comparison of...

No ratings yet

Versions Compared

Old Version 10

changes.mady.by.user Dominika Kurek

Saved on Apr 12, 2016

compared with

New Version Current

changes.mady.by.user Dominika Kurek

Saved on Apr 12, 2016

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
title In this topic

 

Table of Contents
maxLevel 3

Layout configuration

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

 

In Exponential (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
language ruby
theme Confluence
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
language ruby
theme Confluence
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:

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

 

Configuring Blocks

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

Panel

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

Code Block
language ruby
theme Confluence
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
language ruby
theme Confluence
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'

 

 

Comments

Add a comment

Comments are read by a moderator before they appear.