[support] Setting head_title and title independently

Jonathan Hedstrom jhedstrom at opensourcery.com
Tue Jun 17 22:53:17 UTC 2008



David Carman wrote:
>
> I have been trying to add support to the panels module (I am not
> associated with it) for a separate title in the title bar and in the
> in-page text.
>
>  
>
> I have modified the module to get the two strings and store them in
> the database, but I am having trouble figuring out how to set
> $head_title and $title in the theme.  It the title is currently set
> using the drupal_set_title function, which seems sets both of those
> variables.  Is there was any way to set those variables independently
> or override the set_title function because I do not want to change the
> core?
>
>  
>
> I apologize if this has been covered else where, I could not find it.
>
You should be able to set them separately in template.php, using
_phptemplate_variables for D5 [1] or phptemplate_preprocess_page for D6 [2]

something like:

$vars['title'] = 'foo';
$vars['head_title'] = 'bar';

1. http://api.drupal.org/api/function/_phptemplate_variables/5
2. http://api.drupal.org/api/function/phptemplate_preprocess_page/6

Cheers,

Jonathan

-- 
Jonathan Hedstrom                                     OpenSourcery
http://opensourcery.com                        Technology for Good


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.drupal.org/pipermail/support/attachments/20080617/4ab95a13/attachment.pgp 


More information about the support mailing list