Hello. I would like my AJAX site to be usable with Javascript disabled also. That means most pages can be loaded by AJAX calls and by normal page request calls in browser. Is there a way to automatically handle AJAX calls in symfony2 so that on AJAX calls templates are not decorated by the layout?
So far I have found only one way to do that - to use [url=http://www.twig-project.org/doc/templates.html#conditional-inheritance]Twig's conditional inheritance[/url]. It will allow you to write something like {% extends isAjax ? "layout-ajax.html.twig" : "layout.html.twig" %} But you have to pass isAjax variable to template. That's one line of code, of course, but does symfony2 have something built-in? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en