Skip to content

Instantly share code, notes, and snippets.

@steffenr
Created April 11, 2011 07:10
Show Gist options
  • Save steffenr/913174 to your computer and use it in GitHub Desktop.
Save steffenr/913174 to your computer and use it in GitHub Desktop.
template_preprocess_html / template_preprocess_page
<?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