What about this.... <dtml-in query> ...do somestuff <dtml-else> ...do other stuff </dtml-in> ----- Colyn Brown
From: "Kevin Carlson" <khcarlso@bellsouth.net> Date: Tue, 16 Jul 2002 15:35:40 -0400 To: "Alexander M Hottenstein" <ahottens@engin.umich.edu>, <zope@zope.org> Subject: RE: [Zope] dtml-in output if no objects are found
Here's one way to do it:
[in this example, "query" is what you want to iterate over in the eventual <dtml-in>
<dtml-let results="query"> <dtml-if "_.len(results) > 0"> <dtml-in results> ... do whatever ... </dtml-in> <dtml-else> ... do whatever ... </dtml-if>
Hope that helps,
Kevin
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Alexander M Hottenstein Sent: Tuesday, July 16, 2002 2:12 PM To: zope@zope.org Subject: [Zope] dtml-in output if no objects are found
I have a dtml-in that pulls in two different types of objects and outputs data from them accordingly. I want to output a message if no objects of this type were found. Is there a direct way to do this?
- Alex
_______________________________________________ Zope maillist - Zope@zope.org 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 maillist - Zope@zope.org 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 )