[Zope] Accessing Subobjects of a ZClass Instance

Tres Seaver tseaver@palladion.com
Wed, 23 Feb 2000 15:07:41 -0600


Nico Grubert <nico@beehive.de> writes:
> 
> I created a ZClass containing
> -Base Classes both "Object Manager" and "Catalog Aware"
> -Subobjects both "Image" and "File".
> 
> In a DTML-Methode all properties of an instance are shown by:
> <dtml-in "PARENTS[0].objectValues(['MyProduct'])">
> <tr>
> <td><dtml-var myObjNr></td>
> <td><dtml-var myObjTitle></td>
> ....
> 
> "myObjNr" is the id of each object.
> 
> Some Objects contain a file or an image or both a file and an image.
> I upload two images "beach.gif" and "water.gif" to the instance e.g.
> "MyObj01".
> the tag <img src="<dtml-var myObjNr>/beach.gif">
> this works fine and shows me the image "beach.gif".
> What I need to do that I can see all images or even better the whole
> content an instance contains ?
> Something like ????
> syntax:
> <img src="<dtml-var myObjNr>/___content of an instance______">

A DTML Method like the following shows all images contained within a Folder (or
within a "folderish" ZClass instance like yours)::

  <dtml-in "objectValues( 'Image' )">
    <dtml-var sequence-item>
  </dtml-in>

-- 
=========================================================
Tres Seaver         tseaver@palladion.com    713-523-6582
Palladion Software  http://www.palladion.com