You are here

function eldir_preprocess_node in Hostmaster (Aegir) 6

Preprocessor for theme_node().

File

themes/eldir/template.php, line 63

Code

function eldir_preprocess_node(&$vars) {
  if (!empty($vars['node'])) {

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