[Zope] images and HTML code in a product

Dieter Maurer dieter@handshake.de
Sat, 4 Aug 2001 11:26:14 +0200 (CEST)


Gregory Popovitch writes:
 > Thanks for the answer, Dieter. I have looked at it today and I think 
 > I should be able to use the 'Globals.ImageFile(path, globals())' call 
 > to define a new property in my product (a python product)... sounds 
 > like your first suggestion.
 > 
 > But my gif directory has a hierarchy, and I don't really know how 
 > to simulate this hierarchy in my product.
Do you want to simulate the hierarchy?
It would not be necessary from Zope's point of view...

If you want to, you could implement the hierarchy with appropriate
container objects inside your product class.

It might be possible that you can simply use "OFS.ObjectManager"s
as containers. But it may be possible that the
"Persistent" included in "ObjectManager" makes life a bit
difficult for you. If this would be the case, you would have
two options:

  1.  hack around persistence (by setting "_p_changed" to 0,
      after you have build the container)

  2.  build your own container.
      You may look at the "Products.CMFCore.DirectoryView" (part
      of CMF) on how to do this.


Dieter