symfony - Avoid Embedded Controllers for twig -



I'm trying to customize my symfony application.
I use the code to render the template

  return $ this - & gt; Render ('AcmeArticleBundle: Article: recentList.html.twig', array ('articles' = & gt; $ article));  

I've heard somewhere else that it is very slow and should be replaced with the twig extension. I know how to use the jogging extension, but I do not know how to load a twegg file that will include my twitch extensions.
Can you explain me the complete replacement process? Thanks

You can add the $ this-> render method to < Confused with strong> render tag of toggle templates (speak symphony strictly as it is an extension).

It's OK to use $ this-> render inside the controller!

A Render tag is available in Symphony 2 Timm templates, which creates a new sub-spave that uses a lot of memory and time not to use it You can avoid (and you can) The document for this feature is here:


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -