Skip to content

Instantly share code, notes, and snippets.

@develnk
Created September 8, 2014 14:04
Show Gist options
  • Save develnk/f351945f4b15cd1b256e to your computer and use it in GitHub Desktop.
Save develnk/f351945f4b15cd1b256e to your computer and use it in GitHub Desktop.
<?php
/**
* Implements hook_preprocess_html().
*/
function hook_preprocess_html(&$vars) {
$vars['theme_hook_suggestion'] = 'html__custompage';
}
<?php
/**
* Implements hook_preprocess_node().
*/
function module_name_preprocess_node(&$vars) {
// Use different template
$vars['theme_hook_suggestions'][] = "node__type_content__custom";
}
<?php
/**
* Implements hook_preprocess_page().
*/
function hook_preprocess_page(&$vars) {
$vars['theme_hook_suggestion'] = 'page__custompage';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment