[Zope-CMF] CMF type question

Florent Guillaume fg@nuxeo.com
Mon, 27 May 2002 15:46:48 +0000 (UTC)


There's a third choice, which is more CMFish: create a Scriptable
Type, and in the creation method instantiate a File product, and add
it a property with the data you want. Then update the actions to point
to new view/edit methods for the display and modification views.

You can even simply use a Factory Type if you don't mind properties
that may not exist, and can deal with them in you view or edit
methods.

In effect this gives you pretty much all the power of ZClasses without
the hassle.

Florent


Carl Rendell  <cer@sol43.com> wrote:
> 
> On Friday, May 24, 2002, at 09:00  AM, Kevin Carlson wrote:
> 
> >
> > Anyone know of a CMF type that is a cross between File and Document?
> > Something that can have structured text associated with it and 
> > also have an
> > upload file such as a PDF?
> 
> I don't know of one off the top of my head, but it is not difficult 
> to create one.
> 
> You're basically adding a new property to the File product (a text 
> field), and have two choices -
> 
> o Create a ZClass based product with CMFDefault: File as the base class
> 
> o Create a new product which inherits from the CMFDefault File product.
> 
> ZClasses are easier to get going, but as I've found are a mess to 
> deal with later on.
> 
> This one is pretty simple because you're only adding the single 
> property to a standard CMF product.
-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com