[Zope] Using all_meta_types correctly
Terry Hancock
hancock at anansispaceworks.com
Tue Dec 9 17:42:00 EST 2003
I'm trying to limit the "add" menu in a folderish object as part of my
product, and I seem to be missing something.
I've added the following lines to my object's class definition:
all_meta_types = ( {'name':'Narya-Topic', 'action':'manage_addTopicForm'},
{'name':'Narya-Thread', 'action':'manage_addThreadForm'}
)
meta_types = all_meta_types
based on information I was able to find by searching on zope.org
(but it's very sparse). And there's an example in App/Product.py
which looks very similar to this.
But, when I try to use the resulting add menu, I get a "Not Found"
message on 'manage_addTopicForm'.
When I remove these lines, and use the unlimited add menu, it
directs me not to:
myfolder/manage_addTopicForm
but to
myfolder/manage_addProduct/Narya/manage_addTopicForm
obviously mirroring the Python syntax:
myfolder.manage_addProduct['Narya'].manage_addTopicForm()
which I've already gotten used to using in my product code.
Can anybody tell me what I should change here? If I wanted to
tell it to access the latter URL, would I use Python or URL syntax?
OR, is this telling me I have something more important wrong? How
should this work?
Cheers,
Terry
--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks http://www.anansispaceworks.com
More information about the Zope
mailing list