Closed (fixed)
Project:
Page Title
Version:
5.x-1.1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Apr 2008 at 04:40 UTC
Updated:
7 Jun 2008 at 16:01 UTC
Might be easy, but too hard for me: This is the code of the page_title version I got:
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;
}
And this the one of advanced forum, quite standard if statement:
function _phptemplate_variables($hook, $vars) {
if (module_exists('advanced_forum')) {
$vars = advanced_forum_addvars($hook, $vars);
}
return $vars;
}
Well, I know to start the
function _phptemplate_variables($hook, $vars)
only once and to return $vars only once in one way or another, but still...
They don't seem to be able to be combined simply as two if cases, and
Michelle was wondering how to get along with the $vars = array();
of page_title.
Help greatly appreciated
Comments
Comment #1
nicholasthompsonTry this...
Comment #2
eigentor commentedDoes not seem to work. Advanced forum still gets its vars, but page title does not turn up. Well - the module is active and the module settings page is there.
But - I got page title working on another stie - I think the extra input field should turn up on every content type edit form without having to be extra activated. Alas - it doesn't.
But I cross-checked on the other site and put in the code - works. So it seems to be the fault of my template. Any hints what may keep it from working?
Comment #3
nicholasthompsonOk - try this:
I dont know how advanced_forum works, so it might do some funky key replacement stuff?!
Comment #4
eigentor commentedGotta investigate deeper.
Thanks for your help, Nicholas. I think it is neither the fault of page_title and also not of the templat.php code. For testing I switched back to garland, deactivated advanced_forum and even used the original template.php code given in the readme of page_title. No Show of page title on the node forms.
So the error must be elsewhere... Maybe I gotta dig deeper and try to intercept the variables, activate Devel and stuff to see where it gets lost...
Comment #5
wayland76 commentedHere's an idea that might help us all.
http://drupal.org/node/254799
Comment #6
nicholasthompsonAssuming fixed (no reply for nearly a month)?
Comment #7
eigentor commentedYes, the code you supplied worked in the end.
Thanks and sorry for not answering anymore, I did not visit my issues for about a month...