function bartik_preprocess_html
bartik_preprocess_html(&$variables)
Add body classes if certain regions have content.
File
- themes/bartik/template.php, line 6
Code
function bartik_preprocess_html(&$variables) { if (!empty($variables['page']['featured'])) { $variables['classes_array'][] = 'featured'; } 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'])) { $variables['classes_array'][] = 'footer-columns'; } // 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)); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/themes!bartik!template.php/function/bartik_preprocess_html/7.x