Dimitrios Desyllas
Dimitrios Desyllas

Reputation: 10030

Symfony Twig {{render}} handling passed arguments

Over a template I do a render method:

{{ render(controller('AppBundle:Widgets:myCapsWidget'),{'somestring':someString})  }}

Over the controller I have the following method:

public function myCapsWidgetAction($somestring)
{
  return new Response(strtoupper($somestring));
}

I also looked over theese links:

But still cannot find any light to my path.

Upvotes: 1

Views: 412

Answers (1)

goto
goto

Reputation: 8164

If I read the first link you gave us, you should use:

{{ render(controller('AppBundle:Widgets:myCapsWidget',{'somestring':someString}))  }}

Upvotes: 1

Related Questions