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
Post a Comment