-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
Description
(In this example I've just added code to the AcmeDemoBundle to make it easier to reproduce):
Twig code added to AcmeDemoShopBundle:Demo:index.html.twig:
{% render 'AcmeDemoBundle:Demo:hello2' with {'_format' : 'otherformat'} %}
Controller code added to Acme\DemoBundle\Controller\DemoController:
/* @route("/hello2.{_format}", name="_demo_hello2", defaults={"_format" = "defaultformat"})
- @template()
*/
public function hello2Action($_format) {
return array('_format' => $_format);
}
When the Twig template calls the render function the _format parameter is ignored and the controller always see "html" instead 'otherformat' (specified in the render function).