function eldir_preprocess_html

7.x-3.x template.php eldir_preprocess_html(&$variables, $hook)

File

./template.php, line 54

Code

function eldir_preprocess_html(&$variables, $hook) {
  $node = menu_get_object();
  if (!empty($node)) {
    $type = $node->type;

    $variables['classes_array'][] = " node-page";
    $variables['classes_array'][] = " ntype-{$type}";
  }

  // Add path-based class for a last line of defense
  $current_path = current_path();
  if (!empty($current_path)) {
    $variables['classes_array'][] = ' path-' . drupal_html_class(current_path());
  }

  // Add special body class for error pages
  #  if (menu_get_active_item() === 0) {
  #    $variables['body_classes'] .= ' error-page';
  #  }

}