Hello congratulation for your work. I'm in drupal 5.8 and custom template. Trying to use this great module.
It is not working even after editing of code in template.php (I think documentation is not too clear for pleople not used with php codes and variables, number of lines to modify should be more clear)
I've edited the template.php and now it looks like:
function _phptemplate_variables($hook, $vars) {
if ($hook == 'page') {
if ($secondary = menu_secondary_local_tasks()) {
$output = '<span class="clear"></span>';
$output .= "<ul class=\"tabs secondary\">\n". $secondary ."</ul>\n";
$vars['tabs2'] = $output;
}
// Hook into color.module
if (module_exists('color')) {
_color_page_alter($vars);
}
//page title
if (module_exists('page_title')) {
$vars['head_title'] = page_title_page_get_title();
}
return $vars;
}
return array();
}
trying the second method mentioned , i've seen that in our template file page-default.tpl.php the TITLE TAG is declared in this way : print $title
Comments
Comment #1
nicholasthompsonYou've correctly editted the template.php...
The problem is that you're looking at $title. This is the node title.
Check the section of your page.tpl.php (or page-default.tpl.php - never seen this one...?!). In there you should see:
The Page Title module modifies (via the template.php modification) the
$head_titlevariable (hence the use of that key in the$varsarray.Hope this helps. Please let me know if you're still stuck.
Comment #2
osviweb commentedFine I've done so and it works!
I've added
print $head_titleI guess my page-default.tpl.php exists because we use different templates according to the page content in a custom edited template.
In your readme file please note where you say:
These lines need to be added to the 'page' hook of the _phptemplate_variables
function.
Here I think you should give more info about where and how to paste the 3 lines of code. I've tried few times and got some errors before to catch it.
congratulations for you work and thanks for great support
Osvaldo
SITE:agenzia viaggi TUI
Comment #3
nicholasthompsonThe problem with documenting it to that level is that EVERYONE's template.php is slightly different.
Also - from Drupal 6 onwards there is no need for any modifications to template.php...
Glad its working for you now :)
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.