On Thursday 14 September 2006 14:21, Luis De la Parra wrote:
> wow. thanks for the offer... maybe I'm doing something wrong somewhere else
> then. I'm attaching a minimal package which (does not) work(s) for me:

Here is you problem:

You registered the page "viewlet.html" as follows:

  <browser:page
    for="*"
    name="viewlet.html"
    template="index.pt"
    permission="zope.View"/>

For some reason this caused this view to be really a view the default view 
(index.html), so that you implicit traversal was:

file.txt/@@index.html/@@viewlet.html

... or something like that. I did not investigate further. Then I changed the 
registration to:

  <browser:page
    for="zope.app.file.interfaces.IFile"
    name="viewlet.html"
    template="index.pt"
    permission="zope.View"/>

and everything worked just fine. Whether the described traversal behavior is 
correct I cannot say without a bit more digging, which I have no time for 
now.

How did I figure that out? I went to zope.viewlet.manager.ViewletManagerBase 
and did some debugging just before the viewlets were looked up and found that 
the context was not what you would expect. I immediately knew that the page 
"viewlet.html" was working onto the wrong context and thus registered it for 
the specific interface and everything worked.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to