« Return to Thread: [G3/Patch] More flexibility with themes

Re: [G3/Patch] More flexibility with themes

by Romain LE DISEZ-5 :: Rate this Message:

Reply to Author | View in Thread

Le samedi 23 mai 2009 à 23:47 -0700, Bharat Mediratta a écrit :

> Yes, that is a serious problem.  The order I would prefer to see is:
>   1) theme/ACTIVE_THEME/views
>   2) modules/MODULE_1/views
>   3) modules/MODULE_2/views
>      ...
>   N) core/views
>
> This allows any module to override the core, and the theme to override
> everything.  This doesn't solve the problem of conflicting modules
> trying to override each other, but I'll save that problem for another day.
>
> The problem as I see it is that Kohana::include_paths() puts APPPATH
> first.  I don't understand why it forces that requirement, but since
> it's a private member of a final class, they don't make it easy for us
> to get around that issue.
>
> So, I changed the Kohana code in r20909 and filed this ticket:
>   http://dev.kohanaphp.com/issues/1695
>
> Once you svn up, you should be able to override any view, controller,
> library or helper in your theme.  Let me know if this doesn't fully
> solve your problem.

Your patch doesn't do the same as mine (but they are not incompatible).

My patch was a way to provide inheritance capabilities for the themes.
But the problem with it is that the themes can only inherit of
"default". Inheritance can be generalized by adding a variable to
theme.info :
    parent = <theme name>

But I'm not sure you are interested with that, so I will not waste time
on it unless you ask me. My second patch was also about inheritance...

So for now, with your patch, I can't create a theme with only :
    mytheme/
       theme.info
       views/
          simple_uploader.html.php
(I must copy the default theme and add the file
simple_uploader.html.php)

Greetings.


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
__[ g a l l e r y - d e v e l ]_________________________

[ list info/archive --> http://gallery.sf.net/lists.php ]
[ gallery info/FAQ/download --> http://gallery.sf.net ]

 « Return to Thread: [G3/Patch] More flexibility with themes