[Zope3-dev] Products: Contents View Tab?

Ian Beatty beatty at physics.umass.edu
Wed Apr 28 10:25:17 EDT 2004


Greetings.

I hope this is the right forum to post in. I'm trying to get my mind around
product development for Zope 3, and I've run into a bit of a sticking point.
I want to build a content class ('Roster') that's a container (subclass of
BTreeContainer). I've defined an interface ('IRoster') for it (subclass of
IContainer).

So I'm trying to add a "Contents" tab to the class' ZMI interface. If I do
it the way that the "Tutorial for Python Programmers" ('short.pdf')
suggests, with the 'browser:containerViews' in my configure.zcml file, it
works -- but I don't know how to have the tab's label be something other
than the default "Contents".

On the other hand, if I follow the Cookbook (p.118) and use the
'browser:menuItem' tag, I get an error when clicking on an instance of the
class in a parent's contents view in the ZMI: NotFoundError, "Error object:
(, u'contents.html')". It bothers me that the Cookbook's recipe doesn't seem
to work. Is the Cookbook obsolete?

On yet another hand, if I follow the Zope 3 Developer's Tutorial ("Step 8:
Zope Container Framework") and use the 'browser:page' tag, I seem to get the
tab I want with the name I want. It works, though I can't say I understand
why.

So I have a solution to my problem, but it's pretty much black magic to me
why one approach works and the other two don't. That's not a happy place for
a developer to be. Can anyone share a little enlightenment?

Thanks,

..Ian

-- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- --
Dr. Ian Beatty                           beatty at physics.umass.edu
Physics Education Research                    voice: 413.545.9483
Department of Physics                           fax: 413.545.4884
Univ. of Massachusetts              AIM: (available upon request)
Amherst, MA 01003-9337 USA       http://umperg.physics.umass.edu/
-- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- --





More information about the Zope3-dev mailing list