Closed (fixed)
Project:
Page Title
Version:
5.x-1.1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Feb 2008 at 02:55 UTC
Updated:
8 Feb 2009 at 00:14 UTC
Upon the creation of a book page, I supply the Page Title I want, but the browser still shows the Node's Title instead of the one I specify.
I looked around to see if other people I the same problem. I did see one thread wherein it was suggested to add the following code to my template.php:
if (module_exists('page_title')) {
$vars['head_title'] = page_title_page_get_title();
}
which I did. No dice.
I am running Drupal 5.3 in a folder (not at root) of my website
Thanks in advance!
Beth
Comments
Comment #1
tone1 commentedCan't get it to work, either it's not working or I am not understanding that there is more needed to do. Is this a Drop in Module (Wham Bam, Enable?) or is this a Drop in Module (Now Break out the tools?) Is there more than just dropping it in to the Module folder, Enable, Configure = Your set to go? If it does require more, can you please explain the process a smigg more clearly. I do apologize if this sounds rude, I don't mean it too (I=No0ber).
Comment #2
nicholasthompsonI dont suppose you read the README.TXT which was provided in the modules folder did you?
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/page_title/...
Basically, once the module is enabled you MUST go into your theme's template.php file and add the lines which set the $vars['head_title']. Unfortunately the head_title is one of the few things that isn't exposed very well.
You must add these lines inside the _phptemplate_variables function but ONLY when the $hook is 'page'... So your function MIGHT look something like this...
If you guys are still having problems, please post back. The module DOES work - you just need to make sure you've read the instructions first ;-)
Comment #3
bitsyboo commentedUm. Yeah. It works now. *sheepish grin*
RTFM -- I really need to be better about that. Thanks for the help and patience!
Comment #4
nicholasthompsonNo probs - glad its working for you now :)
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #6
bigsend commentedI don't see a _phptemplate_variables function. I do use the Bluemarine theme (come stock with Drupal 5.7), so I guess I'd be looking for bluemarine_variables but I don't see that either.
There is a page.tpl.php, node.tpl.php, comment.tpl.phph, box.tpl.php, block.tpl.php file. I assume we'd work with the page.tpl.php.
I do not see where in the code we copy and paste the
Unless we just stick it in the < title > < / title > section, I don't see where to put it.
-Thanks
BigSend
http://bigsendworld.com
http://mydrupaladventures.com (this is the blog I am working with now to implement it)
Comment #7
jbrauer commented@bigsend In the case where you don't have an existing _phptempate_variables() function you should add the entire code snippet from your comment (just leave out the ?php tags itself.
Comment #8
bigsend commentedAdd it... to where?...
Comment #9
jbrauer commentedTo the template.php file.
Comment #10
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #11
mindgarden commentedWhy I still can't get it to work after putting that code in template.php?
I'm using the Acquia Marina theme on D6.
Btw, is that code missing the line: $vars = array(); ?