Re: [Zope] TREE tag - not showing Folderish objects that contain no sub-objects

2001-01-14 Thread Dieter Maurer

Kevin Howe writes:
  ...
dtml-tree expr="PARENTS[-1]" branches_expr="objectValues()" sort=id
  ...
  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.
Search the searchable list archive.

There has recently been a thread about filtering for "dtml-tree".
Search for "branches_expr" to locate the thread.


Dieter

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




[Zope] TREE tag - not showing Folderish objects that contain no sub-objects

2001-01-13 Thread Kevin Howe

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"
sort=id

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?

Kevin



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