Created
April 11, 2011 07:10
-
-
Save steffenr/913174 to your computer and use it in GitHub Desktop.
template_preprocess_html / template_preprocess_page
This file contains hidden or 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
<?php | |
function mytheme_preprocess_html(&$variables) { | |
// wurde die seite über AJAX request aufgerufen? | |
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest' ) { | |
$variables['theme_hook_suggestions'][] = 'html__sites__xhttp'; | |
} | |
} | |
function mytheme_preprocess_page(&$variables, $hook) { | |
// wurde die seite über AJAX request aufgerufen? | |
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest' ) { | |
$variables['theme_hook_suggestions'][] = 'page__xhttp'; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment