[Zope3-dev] Re: View lookup changes in Zope 3.2?

Jim Fulton jim at zope.com
Wed Dec 14 10:43:59 EST 2005


Martijn Faassen wrote:
> Jim Fulton wrote:
> 
>> Jeff Shell wrote:
> 
> 
>>> I understand why this is happening, but it's (obviously) not what I
>>> want to have happen. I want MY skin layer's declaration of
>>> 'contents.html' to win out. It actually works for all container types,
>>> so maybe I need to declare it for a root Zope container interface for
>>> my layer?
>>
>>
>> I don't know enough about the relationshipd between your content
>> interfaces, to comment directly, but I will note that the intent
>> was that content interface would have precedence over skin.  This
>> was not the case before due to a bug in  multi-adapter lookup.
> 
> 
> While I probably don't understand some details, this thread rather 
> worries me.
> 
> Imagine I'm writing my own custom skin 'IFoo', that has a page directive 
> for the page 'index' for Zope's 'IContainer' (say), in a layer that's in 
> the skin 'IFoo'. Now someone whose skin setting is set to IFoo is 
> looking at IFolder, which is an IContainer. Zope registers a 'index' 
> page specific for IFolder.
> 
> Would now Zope's more specific registration win?

Yes.

 > How would I accomplish
> making a skin that takes care about overriding *all* IContainers without 
> having to explicitly register for all sub-interfaces?

You can't currently.

 > Or am I wrong in even imagining this would be desirable?

I think so.  If there are custom views for more specific interfaces,
it is likely those custom views provide features that your generic
view doesn't.  It would be a bit unkind for your view to override
those.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the Zope3-dev mailing list