hi guys,
Appreciate you're busy, but, I have a feature request that shouldn't be too difficult to implement which would make life extremely easy for Drupal eCommerce themers and developers.
i.e. when calling the external ec_modulename_theme.inc include files...can we add in an extra "does this file already exist in the active theme folder"? check before it loads the external file?
In simplicity, what that means for a themer is that instead of faffing about with template.php overrides and such, they can simply copy the ec_cart_theme.inc, for example, into their active theme folder and edit to suit. i.e. the ec_cart.module would load the theme.inc file in the active theme folder, rather than the default one in the ec_cart module folder.
Theoretically, the themer could simply edit the .inc file in the respective module subfolder, but, I like the idea of keeping it seperate and in the active theme folder, so there's more control and slipping back to default is as easy as removing the .inc file from your theme.
In terms of performance hit, the module is pulling in an external file anyway..so it won't make any difference if it's in a different folder.
Themers (wet) dream
If all the theme functions were slipped into ec_modulename_theme.inc files as standard, it would be a themers (wet) dream because it would increase productivity and make life so much easier.
I can roll a simple patch to illustrate what I'm talking about in code....that is if you guys think it's a good idea and doesn't conflict with any plans you guys already had re: themeing eCommerce.
dub
Comments
Comment #1
gordon commentedYes I would like this, but at this stage I have only moved all (I think) the theme functions into ec_modulename.theme.inc and later intend to move what I can to templates.
You now have commit access so if you find any I have not moved, please move them to the right file, and if they can be made into templates move them to a template file.
Comment #2
Phillip Mc commented+1 from me. I think this is a great idea and would be an extremely useful feature.
Comment #3
gordon commentedIt is coming, Once we gt into the RC releases I will look at turning most of these into template files
Comment #4
gordon commentedI have converted all the ec_cart theme functions to templates, so they can be themed much easier. Please take a look and let me know what you think. I am planing to do all the theming like this so it is much easier for people.
Most of the real heavy code in in templates/theme.inc
Gordon.
Comment #5
gordon commentedI think I got most of the way to this, but work will continue for 7.x