[PEAK] sitemaps: <content> in non-root <location>

Radek Kanovsky rk at dat.cz
Fri Jan 7 13:25:03 EST 2005


On Fri, Jan 07, 2005 at 01:12:25PM -0500, Phillip J. Eby wrote:

> >So sitemaps.addHelper should be fixed
> >too:
> >
> >    def addHelper(handler,helper):
> >        def helped_handler(ctx, ob, namespace, name, qname, 
> >default=NOT_GIVEN):
> >            ob = helper(ob)
> >            return handler(
> >                ctx.clone(current=ob, viewHandler=ctx.viewHandler),
> >                ob,namespace,name,qname,default
> >            )
> >        return helped_handler
> 
> Right; I see what you mean.  I'm wondering if maybe I should just add 
> 'viewHandler' to the list of attributes that are automatically cloned.  But 
> I'm not sure if there are maybe clonings that change 'current', but where 
> the viewHandler should *not* be kept.  I'll have to take a look at that.

I have roughly checked all clone() calls in peak.web and there is
probably another clone() call in templates.Expects class that need fix.
Maybe, some global fix would be better.

RadekK



More information about the PEAK mailing list