symfony2 render controller with get parameters
Yes, it doesn't send the parameters as a GET request, but seems to call the method directly.
Twig template part:
<div id="question-choose-semester"> {{ render(controller('UnswCamsBundle:Semester:choiceAjax', { 'redirect': path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params'))} )) }}</div>
Create an optional parameter. If using annotations to define the route, you don't have to add it to the annotation specification.
public function choiceAjaxAction($redirect = "", Request $request) {
Then check the GET parameter:
if (empty($redirect)) { $redirect_uri = $request->query->get('Redirect');} else {