[Zope3-Users] Re: Traverse to nearest site in menu action

jürgen Kartnaller j.kartnaller at cable.vol.at
Thu Mar 31 12:00:44 EST 2005


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 <j.kartnaller at cable.vol.at>
> An: zope3-users at zope.org
> 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) ?

Jürgen



More information about the Zope3-users mailing list