Twig icon indicating copy to clipboard operation
Twig copied to clipboard

render ... with ... params not passed

Open bpartridge83 opened this issue 16 years ago • 2 comments

The tag to render another controller response with parameters doesn't seem to be working, as described in the symfony-reloaded docs at http://docs.symfony-reloaded.org/guides/Twig.html

{# embed another controller response #} {% render 'BlogBundle:Post:list' with ['path': ['limit': 2], 'alt': 'BlogBundle:Post:error'] %}

The {% render '...' %} works just fine without parameters. My guess is that it's in the SimpleTokenParser.php source...

bpartridge83 avatar Aug 09 '10 23:08 bpartridge83

More information on this issue can be found at: http://groups.google.com/group/twig-devs/browse_thread/thread/747a0c3440f304c2?hl=en

jseverson avatar Aug 11 '10 15:08 jseverson

I read too fast the first time I had a look at the given example. It should read:

{{{ {% render 'ArticleBundle:Default:success' with ['path': ['param1' : 'this is param1']] %}

}}}

fabpot avatar Aug 13 '10 06:08 fabpot