function eldir_preprocess_node

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

Preprocessor for theme_node().

File

./template.php, line 79

Code

function eldir_preprocess_node(&$variables, $hook) {

  if (!empty($variables['node'])) {
    // Add a node type label on node pages to help users.
    $types = node_type_get_types();
    $type = $variables['node']->type;
    if (!empty($types[$type])) {
      $variables['title'] = "<span class='label'>{$types[$type]->name}</span>" . $variables['title'];
    }
  }
}