może zwrócić :
if ($request->isXmlHttpRequest()) { ... return $this->render('AppBundle:Default:index.html.twig',[ 'foo' => $foo ]);
z twigiem:
<a href={{ path('show', { 'id': foo }) }}>
?
$.ajax({ type: "GET", url: Routing.generate('index') }) .done(function( data ) { console.log(data); });