All pastes #390021 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-03-11 02:51 UTC
rendered paste body
<?php

function _phptemplate_variables($hook, $vars = array()) {

  switch ($hook) {
    case 'page':
      if (drupal_is_front_page()) { // is this needed?
  	    $vars['head_title'] = "My Super Duper Custom Title";
      }
      if (isset($vars['node'])) {
        // set title of the page from the node when the page is the node.
        $vars['head_title'] = check_plain($vars['node']->title);
      }
      break;
   }
    return $vars;
}