By Christoph Schmid on
Hi, I'm new to drupal. Is started with a fresh install of drupal 6.2 + the i18n module and the beginning template: (http://drupal.org/project/beginning) - worked quite well so far. But I spent the whole last night on trying to override functions, but it just doesnt work. I can try to override whater function by putting it into the template.php file, but it does not have ANY effect on my layout. What can it be?
I tried 1000s of combinations like the folowing, but nothing works...
function phptemplate_breadcrumb($breadcrumb) {
if (!empty($breadcrumb)) {
return '<div class="breadcrumb">'. implode(' › ', $breadcrumb) .'</div>';
}
}
or
function beginning_breadcrumb($breadcrumb) {
if (!empty($breadcrumb)) {
return '<div class="breadcrumb">'. implode(' › ', $breadcrumb) .'</div>';
}
}
This is just one example. I tried it with other functions to make sure it does not only concern the breadcrump function.
Any hints for me???
Cheers,
Chris
Comments
or another example
another example. I tried the following:
or
I think I really don't understand some basic stuff about overriding functions as none of the above works...
Cache on?
It looks like your overriding functions are correct. Could be other things like caching. Check in performance that you have your cache turned off. If it is on often you can change the code and nothing happens.
Have you tried something obviously different
gpdinoz
"Everything should be made as simple as possible, but not simpler." - Albert Einstein
Regards
Geoff
Right track
Thank you for your answer. Yes, you were on the right track. I actually have all options under Performance disabled, but I found out that I still have to press the button "clear cached data" EVERY time I changed a function. It's really annoying but it works. Any idea why drupal does cache even if I disabled it? Possible bug?
Chris
I can't answer your question
I can't answer your question as to why it works like this, but I find http://drupal.org/project/cache_disable useful while developing-- though I'm not sure if it will help in this case.
===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime." -- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz
Thanx. Just quickly tested
Thanx. Just quickly tested the module, but it doesn't change anything. I still have to clear cached data manually to make the changes in functions take effect. Any further hints welcome.
Interesting
Intersesting. I haven't used 6 much yet and that is a change from 5.7. I use a module that I wrote 2 years ago to clear the cache when changes I have made don't seem to work. It consists of a link in the Nav menu so it is a one click solution. It also helps to vent some frustration - just hit the link a few times. DIE YOU CACHE!!!
If you are using IE check your browser cache settings. I use FF (with the Web Developer add on) but when I test with IE I set the cache setting to "Check for newer stored versions of the page - every time I visit the web page".
Don't be too quick to write off that module, you may need to clear the cache (a few times ) before it starts to work. Of course you may be correct and it doesn't do anything. It wouldn't be the first time.:-)
If you find out the answer regarding caching - post back here so we all can benefit.
gpdinoz
"Everything should be made as simple as possible, but not simpler." - Albert Einstein
Regards
Geoff
Hi. Seems like I'm not the
Hi. Seems like I'm not the only one with this problem. I also read this post: http://angrymonger.com/blog/drupal-6-caching-woes - there it's mentioned that the solution doesn't work for 6.2. Seems like there is a common problem with caching. Really stupid cause it's nearly impossible to work on themes with this caching problem :(
I am not having any problems
I have upgraded 2 of my clients sites to 6.2 and 6.3 now and I haven't had any problems with caching. I make changes and they show up straight away.
gpdinoz
"Everything should be made as simple as possible, but not simpler." - Albert Einstein
Regards
Geoff