This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » eZ Publish 5 Platform » Using Symfony/Twig Templates in Legacy?

Using Symfony/Twig Templates in Legacy?

Using Symfony/Twig Templates in Legacy?

Wednesday 22 January 2014 8:59:41 am - 4 replies

Hello folks!

I In my application customers have the possibility to create and store content in the frontend. For this I am using the legacy edit.tpl. The content is shown in a twig/symfony template.Legacy templates ( i.e. edit.tpl) have a similar look like my twig templates and the edit.tpl has the same function as in the backend. So there is the "show preview" button which I really need that users can see what they did. And yeah, this is the reason for my question: Can I use my twig templates for all my classes to be used in the legacy templates?
When I click on the preview button eZ redirects me to "content/versionview/" and show the node.tpl. I hope I can load my symfony twig template for my class in this node.tpl, maybe something like

{include twig:/sry/mybundle/Resources/views/mytemplate.html.twig content=$object}

Or is there another way like using a service for this? I think in the confluence was something mentioned that I can use eZ5 and symfony features in legacy?

Greetings, Timmy! \m/

Wednesday 22 January 2014 9:47:50 am

Hi Tim

If I understand you correctly, your issue is actually with content/preview not using your Twig templates, right ? If so, this has already been reported and implemented in master happy.gif Emoticon.

This feature will roll out with version 2014.01 / 5.3. You can use master branch for the time being.


Wednesday 22 January 2014 10:07:23 am

Hi Jérôme,

this sounds like what I need! The PreviewController will than render my twig template defined in the ezpublish.yml?

Greetings, Timmy! \m/

Wednesday 22 January 2014 10:14:57 am

Yep, that's exactly the intent happy.gif Emoticon.

Wednesday 22 January 2014 10:16:31 am

Thanks for the answer! happy.gif Emoticon


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

36 542 Users on board!

Forums menu

Proudly Developed with from