Florian Lindner wrote:
> Am Mittwoch, 9. August 2006 00:27 schrieb Philipp von Weitershausen:
>> Florian Lindner wrote:
>>> Hello,
>>> is there a kind of default defaultView?
>>> So when a object is called and no defaultView is defined that a view like
>>> index.html is called? I thought yes, but a test has not proven that.
>>>
>>> If there is really no such default, why? I think a little bit more
>>> (optional) convention over configuration would be good for Zope...
>> zope.app/browser.zcml says:
>>
>>   <browser:defaultView name="index.html" />
>>
>> So, as you can see, we indeed have a default default view. It's index.html.
> 
> That's what I thought too. But:
> 
> I go to an object and get an 404 error. Now add this ZCML to configure.zcml:
> 
>     <defaultView
>         name="index.html"
>         for="CS.Link.interfaces.ILink"
>         layer="CS.skin.interfaces.ICentershockSkin"
>     />
> 
> and the same URL work. You see that there is already a view named index.html
> 
>     <page
>         name="index.html"
>         for="CS.Link.interfaces.ILink"
>         template="link.pt"
>         permission="zope.View"
>         layer="CS.skin.interfaces.ICentershockSkin"
>     />
> 
> But why is it not used as the default view?

I bet (but don't know for sure) it has to do with your skin layer.

Philipp

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to