Created
August 17, 2015 18:01
-
-
Save zomars/223b3a912f920dfbf3b8 to your computer and use it in GitHub Desktop.
AJAX conditional layout, This is useful if you planing to get only the content of a page or content type via AJAX, by calling a bare bones layout.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# Extend a different layout if requested via AJAX #} | |
{% extends app.request.isXmlHttpRequest ? 'layout-ajax.twig' : 'layout.twig' %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment