/ Published in: PHP
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
<?php
function ivorypearl_preprocess_html(&$variables, $hook) {
// Classes for body element. Allows advanced theming based on context
// (home page, node of certain type, etc.)
if (!$variables['is_front']) {
// Add unique class for each page.
$path = drupal_get_path_alias($_GET['q']);
// Add unique class for each website section.
if (arg(0) == 'node') {
if (arg(1) == 'add') {
$section = 'node-add';
}
$section = 'node-' . arg(2);
}
}
$variables['classes_array'][] = drupal_html_class('section-' . $section);
}
if (theme_get_setting('ivorypearl_wireframes')) {
$variables['classes_array'][] = 'with-wireframes'; // Optionally add the wireframes style.
}
}
Comments
 Subscribe to comments
                    Subscribe to comments
                
                