Page title module being ignored
HollywoodChicago.com - April 12, 2009 - 19:45
I have the page title module installed, but the content I enter for each node's page title is being ignored. In Drupal 5.5, I apparently have to make a manual coding change in my theme's template.php file. When I do so, though, it breaks things. This is what the section of my current theme's template.php file has now:
function _phptemplate_variables($hook, $vars = array()) {
switch ($hook) {
case 'page':
global $user;
if ($vars['is_front']) {
$vars['template_file'] = 'page-index';
}
break;
}
return $vars;
}The module says to have this code:
function _phptemplate_variables($hook, $vars) {
$vars = array();
if ($hook == 'page') {
// These are the only important lines
if (module_exists('page_title')) {
$vars['head_title'] = page_title_page_get_title();
}
}
return $vars;
}If I just replace the current code with the new code, it breaks things. I tried to merge the two, but it also breaks things. Can anyone help me figure out what the code should be with my theme? Thanks!

Try this
function _phptemplate_variables($hook, $vars = array()) {switch ($hook) {
case 'page':
global $user;
if ($vars['is_front']) {
$vars['template_file'] = 'page-index';
}
if (module_exists('page_title')) {
$vars['head_title'] = page_title_page_get_title();
}
break;
}
return $vars;
}
That did it!
That did it! Thank you SO MUCH!
Publisher, HollywoodChicago.com
No problem :-)
No problem :-)