[Zope3-Users] using filter in addMenuItem
Ivan Horvath
pillesoft at gmail.com
Mon Apr 2 10:46:09 EDT 2007
Dear All,
it seems that i have to use filter attribute in browser:addMenuItem
directive. i couldn't find any usable help how to use it, and my
trials are failed so far.
this is the menu declaration in zcml:
<browser:addMenuItem
title="Article"
factory="fa.Article"
view="addArticle.html"
filter="context/isNeedtoDisplay"
permission="zope.ManageContent"
/>
<browser:page
for="zope.app.container.interfaces.IAdding"
name="addArticle.html"
class=".helper.ArticleAddForm"
permission="zope.ManageContent"
/>
i receive always a TraversalError exception. i don't know where shall
i put the isNeedtoDisplay method.
File "D:\alco\zope\src\zope\traversing\adapters.py", line 52, in traverse
raise TraversalError(subject, name)
- __traceback_info__: (<zope.app.publisher.browser.viewmeta.+ object at 0x02D
E9D90>, 'isNeedtoDisplay', [])
TraversalError: (<zope.app.publisher.browser.viewmeta.+ object at 0x02DE9D90>, '
isNeedtoDisplay')
thanks in advance
Ivan
More information about the Zope3-users
mailing list