Closed (fixed)
Project:
Event
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Sep 2008 at 14:21 UTC
Updated:
14 Jul 2012 at 23:22 UTC
The module appears to only draw it's themeing from the built in events.theme file.
My colleague and I have tried (and failed) to find out why this is. We have tried everything (even reading the pro development 2nd edition book) and can not seem to override anything other than the css in our custom theme.
This is causing lots of swearing and we are in danger of having to hack the module files (such a bad idea) to be able to get the output as we want it.
Help is desperately required!
Comments
Comment #1
frank ralf commentedHello,
"Learning Drupal 6 Module Development" by Matt Butcher contains a section about "template.php Gotchas" on page 88 in chapter 3 about The Theme System.
This gives some hints how to overcome problems when trying to theme your content with sub-themes, as you can only override a theme function once (i.e. not in the sub-theme if the same function is already declared in the parent theme).
And if you use a function in phptemplate_hook then this will override the theme function in hook.tpl.php.
You should not use phptemplate_hook but one of the preprocessor functions such as phptemplate_preprocess_block etc.
Hope that will help you.
Kind regards
Frank
Comment #2
abamarus commentedThanks for your input, Frank. I think you may have misunderstood the problem though.
The events module contains it's own sub theme. (That's what it looks like to us anyway).
Using the drupal naming conventions our theme should be able to override the modules theme so we can change the markup however we want using names like mythemename_hookname
This is simply not working and the module theme is always being used for output. We are not getting errors about redeclaring functions. We just need to know how to get our theme used instead of the modules theme.
Comment #3
frank ralf commentedHm, could you perhaps post a code snippet to illustrate the problem?
Comment #4
abamarus commentedWe have tried following the instructions at this link exactly and have had no joy.
http://evenhouseconsulting.com/blog/2006/aug/10/how-override-theming-dru...
Looking at the books (module dev and pro dev) all lead us to believe that this should work and we assume that it did in previous versions or the above site would not have these instructions!
Comment #5
frank ralf commentedThanks for the link. I will have a look at it and give it a try myself.
Comment #6
frank ralf commentedThe following code does work with my installation of Drupal 6.4 (in template.php file in your theme folder):
Have you remembered clearing your cache?
Comment #7
abamarus commentedYes... the cache has been cleared (it is disabled but clicked on clear anyway just to be sure!).
This is weird because it does not work for us. Our theme is a sub theme of garland - this should not effect things surely... or perhaps it does... will experiment a bit more and get back to you...
Thanks for bearing with me on this!
Comment #8
chasz commentedsubscribing
i would like to theme it as well....what exactly are u trying to do???
is it possible to add cck fields in the events calendar views??
Comment #9
frank ralf commentedAs my theme is a sub-theme of Zen this might be a Garland specific bug. You might have a look at the following post:
"Garland overrides template with theme function"
http://drupal.org/node/295895
PS:
Oops, it's not the cache, it's the theme registry which has to be cleared (http://drupal.org/node/173880).
Comment #10
chasz commentedwhen u clear cache it clears that too :D
Comment #11
killes@www.drop.org commentedI am marking this fixed, Frank gave a lot of input wrt to theming.
Comment #12
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.