eZ Community » Forums » eZ Publish 5 Platform » Equivalent of content list in twig
expandshrink

Equivalent of content list in twig

Equivalent of content list in twig

Monday 02 December 2013 4:35:20 pm - 1 reply

Hi,

I'm new to EZ5.I have knowledge of eZ 4 and Symfony, but it is difficult to understand the combination of the two.

I am currently trying to integrate my design html / css in my website.

I have no problem to retrieve content via ez_render_field, but I do not know how to call the child nodes in a template. Before I used the "content list", now I think hat I must define a function controller, it seems long !

Are there function available in templates that allow me to do the same thing as the content list?

If not can I create one in a unique controller and call in all my templates?

Thank you in advance

Monday 02 December 2013 4:51:58 pm

Hi Johann

In eZ 5, we completely separated controller and view logic, so fetch functions are now completely gone (they were controllers in views basically).

You have 2 options:

  1. Override the view controller to enrich the view of everything you need (best practice)
  2. Do a sub-request to a secondary controller which will do the work.

You can also have a look at the DemoBundle which provides a lot of examples. See what is done for the blog posts list: controller / template / config.

It's very quick and easy (I promise!)

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from