[Zope] hard dtml syntax problem

ethan mindlace fremen mindlace@digicool.com
Wed, 12 Jul 2000 20:16:09 -0400


Jerome Alet wrote:
> 
> Hi want to call ZopeFind to find all folders in the current folder which
> doesn't have got any subfolder.
> 
> the following query works but returns all folders, even those which have
> got subfolders:
> 
> <dtml-let myresult="ZopeFind(this(), obj_metatypes=['Folder'],
> search_sub=1)">
> <dtml-in myresult>
> ...
> </dtml-in>

Couldn't you just do a nested dtml-in?  It's kind of hacky, but...

<dtml-in "objectValues(['Folder']">
 <dtml-in "objectValues(['Folder']">
 <dtml-else>
  <p><dtml-var title_or_id> has no folders.
 </dtml-in>
</dtml-in>

you may or may not have to change the dtml-var statement to get the
correct title-or-id.

Hope that helps,
-- 
ethan mindlace fremen
Zopatista Community Liason
Abnegate I!