an example of setting up symfony2 so that requests work with both ajax and normal browser http requests
todo: Current reply on globals to switch between ajax and base templates. Will improve this by replacing with a twig extension that sets the request type on kernel.request