$this->container->get('request')->isXmlHttpRequest()
can also be shortened to $this->get('request')->isXmlHttpRequest()
On Feb 27, 1:58 pm, Christophe COEVOET wrote:
> Le 27/02/2011 20:48, Christophe Beyer a crit :> Hello,
>
> > I want to display a template in two modes : the "normal" mode,
>
Hi,
Symfony2 offers you a method in the request object called:
"isXmlHttpRequest()".
See Symfony\Component\HttpFoundation\Request.php
/**
* Returns true if the request is a XMLHttpRequest.
*
* It works if your JavaScript library set an X-Requested-With
HTTP header.
* It is