Passing current page url to control with Twig in Symfony -


hi have modal contact form on site available on each page of site. when render contact controller on each page trying use this

{% render controller('corporatesitebundle:forms:contactus', { 'contactopen': contactopen defined, route: app.request.requesturi}) %} 

then on controller page contact form wanted grab 'route' value sending over. used:

$request->query->get('route'); 

but form seems fail when submits. can i'm going wrong? thanks

you should try

$request->get('contactopen'); 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -