All pastes #389982 Raw Edit

Untitled

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

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

switch ($hook) {
  case 'page':
    if (drupal_is_front_page()) { // is this needed?
	    $vars['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['title'] = check_plain($vars['node']->title);
    }
    break;
    
  return $vars;
}