How to insert a Controller in Twig with “render” in Symfony 2.2?

后端 未结 1 734
夕颜
夕颜 2020-12-05 02:43

I\'m upgrading my project from Symfony 2.0.22 to 2.2.0 and review somes changes, but i\'m blocked on this :

I would like to render (like in Sf 2.0.X) a header with th

相关标签:
1条回答
  • 2020-12-05 02:51

    In Symfony >= 2.2.x you should embed your controller like this:

    {{ render(controller('AcmeArticleBundle:Article:recentArticles', { 'max': 3 })) }}
    

    Take a look at the documentation:

    Creating and using Templates

    UPGRADE-2.2

    0 讨论(0)
提交回复
热议问题