eZ Community » Forums » eZ Publish 5 Platform » How to render eZFlow blocks in twig...

How to render eZFlow blocks in twig templates?

How to render eZFlow blocks in twig templates?

Monday 08 April 2013 2:03:56 pm - 7 replies

Hi eZ Publish devs!

I've been stuck the last three days trying to find out how to render eZFlow blocks in a landing page content type, or any other content type containing the "page" field, in a twig template. I've tried looking at the eZDemoBundle to see how it is implemented there, without success.

Could anyone please provide me some pointers how to do this? Would really appreciate your assistance.

Monday 08 April 2013 2:09:08 pm

Hi Charles

This is an upcoming "feature" for 5.1 (and the next community release) as this has been implemented recently.

Monday 08 April 2013 2:09:47 pm


There is pull-request that adds support for eZ Flow fields (eZ Page) : https://github.com/ezsystems/ezpublish-kernel/pull/258

It looks like there is no doc for now but you should find some usefull information. 

Monday 08 April 2013 2:43:26 pm

Thanks, Jérôme and Matthieu, for the links!

Friday 12 April 2013 11:28:50 am


I am at the same point as you at the moment. I have a relating question to it.

I want to add some new zone-layouts to my project and use them in my twig template. I found the eZ flow extension in the legacy folder of eZ and also the files, where I can add new zone-layouts, so I could add new ones and see them in my backend, what is described in the eZ 4 documentation here:


I made some changes to some files and realized, that the legacy templates are rendered into my {% block content %}{% endblock %} of the ezDemoBundle pagelayout.html.twig.

I want to create my templates only in Twig. I found in the eZ 5 documentation, that the legacy templates are create created on the fly, if there are no twig templates available.

But how can I realize the zone layouts only with twig? Do I have to use the eZ 4 methods see them in my backend, because it runs in the legacy system? And how can I realize my corresponding templates for my frontend in twig, so that the legacy system doesn't get active?

Thanks for your ideas happy.gif Emoticon


Edit: Please correct me if I see something generelly wrong happy.gif Emoticon

Modified on Friday 12 April 2013 11:39:41 am by Christopher Wiebach

Saturday 13 April 2013 11:29:02 am

Hi DiOmega,

I've not gone as far as realizing the zone layouts in twig yet. I'm still trying to see that my 4.x zone layouts are rendered in eZ 5. But, after cloning the latest code (5.1.0alpha1) from GitHub, I discovered an awesome new config file called ezpage.yml where the zone layouts and blocks can be declared:


I think it should be possible to declare your twig zone layout templates there and have them work on the frontend.

Monday 15 April 2013 10:51:16 am

Hey Charles,

thanks for this information happy.gif Emoticon That sounds really good. I am really looking forward for this feature and maybe a backend that is fully based on symfony too.

Monday 28 July 2014 9:07:28 pm

Hello everyone,

I'm trying to enable twig templates for ezpages, configuring ezpublish.yml as Charles posted.

Even after putting all the configuration tree the route doesn't match.

I'm doing this on my ezpublish.yml:

                        name: "2 zones (layout1)"
                        template: "AcmeTestBundle:zone:2zoneslayout1.html.twig"
                        -  2ZonesLayout1

Am I missing something?

Do I need to configure something else?

Modified on Monday 28 July 2014 10:20:20 pm by Alexandre Martins


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from