Am Donnerstag, 31. MÃrz 2005 13:58 schrieb Florian Lindner: > Am Donnerstag, 31. MÃrz 2005 13:00 schrieb jÃrgen Kartnaller: > > Florian Lindner wrote: > > > Hello, > > > I implemented to traverser to the nearest site using the code in the > > > posting: > > > > > > [Zope3-Users] Re: Traversing to nearest site > > > Von: jÃrgen Kartnaller <[EMAIL PROTECTED]> > > > An: [email protected] > > > Datum: 17.03.2005 13:53 > > > > > > 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? > > > > I do the same without problems. > > Is your folder configuration correct (ZCML, interface, implementation) ?
It works now. I needed to add a permission attribute to the menuItem subdirective. But why? I'm logged in as a zope,Manager and therefor I should have rights to see the site. Another problem I have, that when I've clicked on home a few times you have a URL like that: http://horus.local:8080/++skin++centershock/cs/++site++/++site++/++site++/++site++/++site++ Which in IMO is not so great. Any way to normalize this path? Florian _______________________________________________ Zope3-users mailing list [email protected] http://mail.zope.org/mailman/listinfo/zope3-users
