I currently have a TREE tag as follows:

  <dtml-tree expr="PARENTS[-1]" branches_expr="objectValues()" sort=id>

which basically says:

  "Display objects which can contain sub-objects"

such as Folders, Folderish Products, ZClassed based on ObjectManager, etc.

What I would like to do is display these objects, but ONLY IF they currently
contain some objects, so that if an object does not contain any subobjects
at the moment, it is not displayed. Something like the following:

  <dtml-tree expr="PARENTS[-1]" branches_expr="_.len( objectValues() ) > 0"

Unfortuntately the above doesn't seem to work (can Python's len() function
be called from DTML?).

Does anyone know what expression might do what I am looking for?


Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to