Symfony2.2 render ESI template

不羁的心 提交于 2019-12-04 17:26:12

As the documentation page you provided, you can render one controller within another using:

{{ render_esi(controller('YourBundle:Default:news', { 'max': 5 })) }}

You can also use a route name instead of the controller reference:

{{ render_esi(url('latest_news', { 'max': 5 })) }}

However, you will need to set up a gateway cache for ESI to work.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!