On Thursday 31 March 2005 09:23, Florian Lindner wrote:
> it works: When I'm calling
> http://horus.local:8080/++skin++centershock/cs/++site++ I see the contents
> of the root folder (my nearest site).
> Now I want to use for a menu item:
> Â Â <menuItems
> Â Â Â Â menu="CSnavMenu"
> Â Â Â Â for="*"
> Â Â Â Â layer="centershock">
> Â Â Â Â
> Â Â Â Â <menuItem
> Â Â Â Â Â Â title="home2"
> Â Â Â Â Â Â action="++site++" />
> Â Â Â Â Â Â
> Â Â </menuItems>
> Resulting in:
> Â File "/home/florian/Zope3/src/zope/app/publisher/browser/menu.py", line
> 180, in getMenu
> Â Â return menu.getMenuItems(object, request)
> Â File "/home/florian/Zope3/src/zope/app/publisher/browser/menu.py", line
> 55, in getMenuItems
> Â Â if item.available():
> Â File "/home/florian/Zope3/src/zope/app/publisher/browser/menu.py", line
> 123, in available
> Â Â if not canAccess(view, '__call__'):
> Â File "/home/florian/Zope3/src/zope/security/checker.py", line 114, in
> canAccess
> Â Â checker.check_getattr(obj, name)
> ForbiddenAttribute: ('__call__', <zope.app.folder.folder.Folder object at
> 0xb6ee2d6c>)
> How do I have to call it?

This is because the menu code makes the assumption that any view specified in 
the action provides a '__call__' method. Clearly your custom namespace does 
not. Maybe we should look for a different method that is always available.

Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
Zope3-users mailing list

Reply via email to