Problem using hook_page_title_alter()
goodeit - June 15, 2009 - 20:41
| Project: | Page Title |
| Version: | 5.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Hello,
I am trying to use the hook_page_title_alter() function, and after creating my own module and getting the function to run, I am having trouble actually modifying the title. I tried both receiving the title by reference (&$title) and returning the edited title value.
The one way I was able to get it to work was to change page_title.module line 275 to:
<?php
call_user_func_array($function, array(&$title));
?>This passes the title variable by reference and enables me to edit it using
<?php
hook_page_title_alter(&$title)
?>I'm guessing this could be a bug in the hook implementation of this module, but I may just not know the correct way to use the hook system in this case.
Thanks!

#1
Commited into 2.x-dev - will appear in 2.2 in the next few hours.
#2
Automatically closed -- issue fixed for 2 weeks with no activity.