Stephan Richter wrote:

> ... 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"/>

hmm... I put some debug strings in ViewletManagerBase.__init__ and if I
registered the page for IFile: it works as you said, and I get following
lines on the console:

===========================================
ViewletManagerBase.__init__:
context =  <zope.app.file.file.File object at 0xb585fe2c> 
view =  <zope.app.pagetemplate.simpleviewclass.SimpleViewClass
from /home/luis/src/z/src/test/index.pt object at 0xb58cffec>


If I switch it back to for="*", then I get this output:

===========================================
ViewletManagerBase.__init__:
context =  <zope.app.publisher.browser.viewmeta. object at 0xb5774b0c> 
view =  <zope.app.pagetemplate.simpleviewclass.SimpleViewClass
from /home/luis/src/z/src/test/index.pt object at 0xb5774c6c>

so the context passed from the "page object" to the viewlet manager is wrong
(seems wrong to me) and the adapter look-up fails

can you give me a hint why this viewmeta is my context with this kind of
page registration?

regards.luis


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

Reply via email to