Closed (won't fix)
Project:
Menu Trails
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
17 Aug 2007 at 10:55 UTC
Updated:
24 Jul 2009 at 16:13 UTC
I'm have look through the code but I can't seems to find the right file and location to put the _phptemplate_variables call.
Can you show me an example on antique_modern theme or bluemarine them.
Thanks.
Ying
Comments
Comment #1
SemperFideles commentedBump. I'm using a PHP template that doesn't have a template.php file.
Comment #2
alex ua commentedIf you're using Zen, you put it before this call:
"$vars['body_classes'] = implode(' ', $body_classes);"
Or at least make sure that it's under this:
------
switch ($hook) {
case 'page':"
------
...and before the break that ends the call to the hook.
Comment #3
alex ua commented...and as far as I can tell, this only works with PHPtemplate based themes. Bluemarine claims to be phptemplate, so just add a template.php file (beginning with <?php ) and add in the code provided. Not sure if it will work, but otherwise you should probably switch to a theme that is still actively supported.
Comment #4
backslash commentedSame here! I using a custom made php template without a template.php and cannot get it working.
I don't know actually what to put in my page.tpl.php and ofcource where exactly i put things in my page.tpl.php.
Comment #5
promesI use the Pushbutton theme, a template based theme by default. Putting the code in a template.php file results in a page that reads: "Navigatie overslaan", Dutch for "skip navigation".
Has this code been tested with original Drupal themes?
After I remove template.php, I see 2 Drupal warnings:
* warning: array_merge() [function.array-merge]: Argument #2 is not an array in /var/www/html/themes/engines/phptemplate/phptemplate.engine on line 63.
* warning: extract() [function.extract]: First argument should be an array in /var/www/html/themes/engines/phptemplate/phptemplate.engine on line 391.
Contains the code an error?
Comment #6
davidwhthomas commentedIf you don't have a template.php file in your theme folder.
Create a file called template.php in your theme folder
Put the phptemplate_variables function into that.
done! :-)
DT
Comment #7
wintervanilla commentedI'm using my own theme built up from the 'foundation' theme. It has a template.php file that looks like this:
Upon updating template.php it looks like this:
Am I doing it right? Because when I do this, it breaks my entire page. I get the following error:
Parse error: syntax error, unexpected $end in /home/mesaprog/public_html/drupal/sites/all/themes/mesa/template.php on line 30Thanks,
A
Comment #8
davidwhthomas commentedYou're missing the closing bracket '}' for the switch statement
it should be:
Comment #9
wintervanilla commentedHmm... thanks for the tip. That change did fix the error, however my entire page is broken (completely blank) when I have this function in my template.php file. Any idea what might be causing this? Is there a way around it?
Comment #10
davidwhthomas commentedCheck your php error log for more debug info.
Or, see this page for WSOD (white screen of death) troubleshooting:
http://drupal.org/node/158043
DT
P.S I just noticed the function module_exists is for Drupal 5 + only. If you're using 4.x, take out the if(module_exists(... part
i.e:
Comment #11
opfs commentedwintervanilla: I don't know if you ever got the WSOD (white screen of death) sorted, but I just recently had the same problem with this module in D5. The code is missing a 'return $vars;' line at the end of the _phptemplate_variables function, which was the cause of the WSOD in my case:
Comment #12
sunSorry, Menu Trails for Drupal 5 is not actively developed/maintained anymore. Only issues containing patches may still be considered. Feel free to re-open this issue if you want to provide a patch.