[Zope] Adding image property to ZClass?

Dieter Maurer dieter@handshake.de
Sun, 15 Jul 2001 20:21:56 +0200 (CEST)


Chris Bruce writes:
 > Is there a way to add an image property to a ZClass?
Not as a property, but as content:

  Make your ZClass an ObjectManager (use this as a BaseClass).
  Then, you can use "manage_addImage" to add an image to it.

 > ...
 > Is there a
 > way to do this and only allow one image?
You give your ZClass your own method to upload the image.
This method can check whether there is already an image:

     <dtml-if "_.hasattr(aq_explicit,'my_image')">
       <!-- already there -->


Dieter