[jifty-devel] Order of Component Roots in Jifty

Jesse Vincent jesse at bestpractical.com
Sat Oct 28 23:38:50 EDT 2006




On Fri, Oct 27, 2006 at 08:28:45PM +1000, dbaster at bigpond.net.au wrote:
> Hi there,
> I have been writing a plugin for Jifty but found during testing that a component defined in the Plugin does not override an existing Jifty component.  After investigation, I found that Handler.pm loads the Plugin's component root below the Jifty component and the Application component roots.
> 
> I suggest that a Plugin's component root should be loaded above Jifty and Application so a Plugin does have the ability to overload an existing Mason component.

You really want the plugin component root to override an application's
custom templates? That feels not-right to me. I suspect we really want

	App
	---
	Plugins
	---
	Core

Of course, what I want for christmas is a templating system with real
inheritance.

-j


> 
> Here is the diff.  
> 
> Daryl
> 
> 
> 
> --- Handler.pm.a        2006-10-27 19:27:37.000000000 +1000
> +++ Handler.pm  2006-10-27 19:27:11.000000000 +1000
> @@ -133,7 +133,7 @@
>      for my $plugin (Jifty->plugins) {
>          my $comp_root = $plugin->template_root;
>          next unless $comp_root;
> -        push @{ $config{comp_root} }, [ ref($plugin)."-".Jifty->web->serial => $comp_root ];
> +        unshift @{ $config{comp_root} }, [ ref($plugin)."-".Jifty->web->serial => $comp_root ];
>      }
> 
>      # In developer mode, we want halos, refreshing and all that other good stuff.
> 
> __________________
> 
> _______________________________________________
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
> 

-- 


More information about the jifty-devel mailing list