Jean-Christophe Michel | 2 Jan 2004 11:07
Favicon

Re: resource.php issue

Le ven 02/01/2004 à 09:36, Jason Hines a écrit :
> i've been experimenting with a few alternate way to use Resource within 
> the aspect of a top node.
> 
> 1. Resource extends Node, gets automatically added as child by Node if 
> resources are found.
> 2. Resource uses node/tpl/Resources.tpl with arrays $css_resources and 
> $js_resources, and Node calls $Resource->ApplyTemplate($this)
> 3. some others..
> 
> However I've also tried working with the current implementation of 
> Resource::GetInstance().  The problem here is that the Top app is 
> rendered by Node before the children.. So the children are setting their 
> resources _after_ the Top app sets tpl vars for them.

If they set their tplvars in main()...
You can override Main() and call _RunChildren before _FetchTempalte if
you want to, but in this case we loose the cache handling made in
Node::Main() :(

--

-- 
Jean-Christophe Michel <jc.michel@...>
Symétrie

Gmane