[Zope] Displaying all subobjects

Jeff Hoffman jeff.hoffman@goingv.com
Wed, 27 Sep 2000 12:01:33 -0400 (EDT)


On Wed, 27 Sep 2000 brocken22@gmx.de wrote:

> Hallo Chris,
> thanks for the quick reply, but the method is displaying all the objects
> in the folder and I'd like to get only one metatype of
> objects(i.e.ZClass->cars)but for all levels.

Try creating a DTML Method called 'iterate' (tested):

  <ul>
  <dtml-in objectItems>
    <dtml-if "meta_type == 'DTML Method'">
      <li><dtml-var id>
    </dtml-if>
    <dtml-if "meta_type == 'Folder'">
      <li><dtml-var id>
      <dtml-var "_['sequence-item'].iterate(_['sequence-item'], _)">
    </dtml-if>
  </dtml-in>
  </ul>

The first dtml-if, the one comparing for meta_type == 'DTML Method', is
the one where you specify what you're looking for. In this example, it's
looking for DTML Methods. Change it to 'cars', if that's what you want.

--Jeff

---
Jeff K. Hoffman                               704.849.0731 x108
Chief Technology Officer                      mailto:jeff.hoffman@goingv.com
Going Virtual, L.L.C.                         http://www.goingv.com/