I am using the zen theme. I installed menutrails and it worked well without having to install the code snippet. For some mysterious reason, it stopped working and now I am wanting to install the code snippet. Not being a php coder, I am perplexed as to where to put this snippet. The documentation seems a little vague and I do not know how to proceed.
I need to have the functionality of the menutrails module and I feel quite frustrated. If anyone can help me, I would be very appreciative.
Thanks
Comments
Comment #1
Anonymous (not verified) commentedIn your Zen theme folder (normally
sites/all/themes/zen) locate the filetemplate.php. Inside this file locate the function _phptemplate_variables by searching for function _phptemplate_variables. Inside this function you have acase 'page':block. At the end of this block there is abreak;just before the nextcase 'node':block. Right before thatbreak;you insert the snippet that came with the module.Comment #2
dadderley commentedThanks for your time.
My code in the template.php page looks like this:
It does not cause errors, but on the other hand menutrails is still a no go.
Right now when the menutrails module is turned off, an error is generated and I get this error message:
Fatal error: Call to undefined function menutrails_primary_links()
I recall reading about this in another post, it is necessary to see if the module is turned on or not and then set $vars['primary_links'] and $vars['secondary_links'] accordingly.
So, did I put it in the right place?
As I say, I am not a php coder but I am comfortable mucking around here. I have been playing with this for a few days and still have had no luck. That having been said, this is a super useful module and should be integrated into the Drupal 6.
thanks again
Comment #3
Anonymous (not verified) commentedYou have put the code into the right place. To avoid errors when disabling the module try this (as mentioned elsewhere): Substitute the current snippet with this one:
I use my own theme which was build upon the zen theme and menutrails worked correctly after enabling and configuring them. Did you enable some rules at admin/settings/menutrails?
Comment #4
dadderley commentedI am not sure what is going on any more. I put in the code (with the if) and tried it. It kills the page. Then I went back and tried it without the the 'if'. Now I am back to square 1 where the original code that I posted causes an error. All this time, the module is turned on.
I am very perplexed.
This is the code:
This is the error message:
Parse error: syntax error, unexpected T_STRING in /home/.pashakin/morgie/blog./themes/zen/template.php on line 149
Is there some sort of cache issue happening or has some variable been set in the database that is causing the problem?
As I said before, when I first installed the module it seemed to work fine without having placed the snippet in the code. I did go to the menutrails admin panel and set it up so that it worked with content types. Now it does not work whatever I do and the snippet seems to cause errors. I hope that my description of the problem is adequate.
Comment #5
Anonymous (not verified) commentedYou said when using the if it breaks the page. What kind of error is generated? The one you mentioned? From the snippet you posted I can't see anything that will cause such an error. It looks like you messed something up on insert. I also do not understand why menutrails were working without adding the snippet and stopped working then. Maybe it is interfering with another module? I'm only guessing as I'm not the developer. I don't have much knowledge about the inner workings of menutrails.
Comment #6
dadderley commentedI upgraded my drupal installation to 5.2 in hopes that this would magically make it work. It did not.
Right now this code:
causes no errors. When I turn off the module though, it crashes and I need to get rid of:
to make it work again.
Menutrails is still not happening.
I first tried to implementing this using the zen theme where I had modified the page.tpl.php file. Then I went back to the original file, no luck here either. I tried using the chameleon/marvin theme, where I could not figure out how to add the snippet (as there is no template.css file). It does not work without the snippet.
I am getting discouraged. You say that it is working for you? I would like to the contents or your zen template.php file in my installation. Could you please post it?
Comment #7
dadderley commentedmeant to say (as there is no template.php file)
Comment #8
KHofmeyer commentedI am using the zen theme and attempted to follow these instructions and still no go. I can't find the exact code displayed here, are there versions of the zen theme and this is from an older one?
Where do I put the code and what snippet do I use for drupal 5.10 using the latest zen them with a sub theme in place?
Comment #9
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.