[Zope-CMF] Re: Portal Poll Product (also Re: [PTK(252)[2])
Tim Hicks
Tim Hicks" <tim@sitefusion.co.uk
Wed, 18 Apr 2001 18:07:45 +0100
----- Original Message -----
From: "Dave Woolston" <davew@digicool.com>
To: "Tim Hicks" <tim@sitefusion.co.uk>
Cc: <zope-cmf@zope.org>
Sent: Wednesday, April 18, 2001 4:49 PM
Subject: Re: Portal Poll Product (also Re: [PTK(252)[2])
<snip>
> > My problem now is that my instances get added, but I can't see them
using
> > the 'folder_contents' method on the folder they are in. I know they are
> > there because I can see them using the ZMI and access them by URL. My
> > ZClass sub-classes the following:
>
> This sounds like the filter is filtering them out. I would try two
things:
> 1) Verify you can add a different type and have it show up (like a
Document)
> 2) You may have the incorrect meta type
You got it spot on :-). I had uppercase in one place (ZClass) and lowercase
in another (portal_types). Thanks very much.
<snip>
> > Incidentally, was I right to sub-class 'CatalogAwareBase' for portal
> > content, or should it have been a specific 'CMFCatalogAware' (or some
> such)?
>
> I don't believe you have to add CMFCatalogAware to make you content
> appear in the catalog any longer, (I think that used to be the case).
> Simply by deriving from PortalContent should work. Items that are
> created with the tutorial will appear in the catalog and are searchable
> for question or answers.
OH, great.
> >
> > And one final (related) question, when selecting what to sub-class, am I
> > right in thinking that if the zclass is to define *content*, it should
not
> > really need to sub-class and of the 'whatever Tool' classes?
>
> You are absolutely correct. This tutorial has evolved over time, and
> it makes no longer makes sense to derive *content* from *Tool* classes.
> Shane pointed this out to me and I updated the tutorial a little while
back.
> Tool based classes exist so that you can change the 'behavior' of the
> portal by overriding or enhancing the tool. Sorry if this caused you some
> problems.
It didn't cause me any problems... ever the impatient one, I didn't copy
your walkthrough, but rather used it as a reference for creating a product
of my own (hence the silly mistakes!).
One final question (for now :-) ). Are the CMF classes documented anywhere
(other than looking at the source)? There are loads of them there, but I
don't really know what they all buy me... hence my questions about
CatalogAware and *Tools. I did have a look around cmf.zope.org, but to no
avail.
Cheers
tim