I'm trying to build a new template for PPC landing pages. The template design is very different than the main template, therefore I'm trying to override html.tlp.php for a specific content type.
The content type machine name is "landing_page".
I've created the following:
html--landing_page.tpl.php (everything in the header and footer) page--landing_page.tpl.php (everything in the content area)
I got Drupal to read page--landing_page.tpl.php, but can't get it to read html--landing_page.tpl.php instead of the default html.tpl.php.
I've already tried the code at Override html.tpl.php per node type, but it doesn't work even after clearing the cache multiple times.
Here's what my preprocess_html function in template.php looks like:
function bartik_preprocess_html(&$variables) {
$node = menu_get_object();
if ($node && $node->nid) {
$vars['theme_hook_suggestions'][] = 'html__' . $node->type;
}
/* if ($vars['node']->type == 'landing_page'){
$vars['theme_hook_suggestions'][] = 'html__landing_page';
}
*/
if (!empty($variables['page']['promo'])) {
$variables['classes_array'][] = 'promo';
}
if (!empty($variables['page']['triptych_first'])
|| !empty($variables['page']['triptych_middle'])
|| !empty($variables['page']['triptych_last'])) {
$variables['classes_array'][] = 'triptych';
}
if (!empty($variables['page']['footer_firstcolumn'])
|| !empty($variables['page']['footer_secondcolumn'])
|| !empty($variables['page']['footer_thirdcolumn'])
|| !empty($variables['page']['footer_fourthcolumn'])
|| !empty($variables['page']['footer_fivecolumn'])
) {
$variables['classes_array'][] = 'footer-columns';
}
drupal_add_js(path_to_theme().'/js/jquery.actual.js');
drupal_add_js(path_to_theme().'/js/custom.js');
// Add conditional stylesheets for IE
drupal_add_css(path_to_theme() . '/css/ie.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 7', '!IE' => FALSE), 'preprocess' => FALSE));
drupal_add_css(path_to_theme() . '/css/ie6.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'IE 6', '!IE' => FALSE), 'preprocess' => FALSE));
}