[Zope3-Users] Traverse to nearest site in menu action
Florian Lindner
mailinglists at xgm.de
Thu Mar 31 09:23:32 EST 2005
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?
One other question:
How can I make one of my objects able to be contain a site. Using
zope.app.component.interfaces.IPossibleSite as a marker interface (like
<implements interface="zope.app.component.interfaces.IPossibleSite" />
in the <content> directive) does not make it. There is a link to add a site,
but I get a system error when trying to add it.
Or directly inherit from zope.app.folder.interfaces.IFolder?
Thanks,
Florian
More information about the Zope3-users
mailing list