[Zope] Complex dtml-in/ZopeFind ?

Kai Hofmann hofmann@isl.org
Thu, 3 May 2001 11:27:04 +0200


Hi,

I have the following code now:

    <dtml-in "subdir.objectValues('DTML Document')"=20
sort=3Dbobobase_modification_time reverse>
      <dtml-if sequence-start>
        <tr><th>bla</th></tr>
        <tr><td>
      </dtml-if>
      <dtml-if "(startdate <=3D _.DateTime()) & (_.DateTime() <=3D enddat=
e)">
        <h2><dtml-var title></h2>
        <dtml-var sequence-item>
      </dtml-if>
      <dtml-if sequence-end>
        </td></tr>
      </dtml-if>
    </dtml-in>

the problem here is that the sequence-start/end will always be executed -=
 for=20
the case that there is an object outside of the start/end date window!
So I have to move the if (startdate <=3D _.DateTime()) & (_.DateTime() <=3D=
=20
enddate) condition into the dtml-in ....
Or replace thedtml-in with ZopeFind or something else ....

Is it possible to but everything I need into a dtml-in or a ZopeFind?
As it looks to me - I can not add the if condition to the dtml-in - on th=
e other=20
hand I don't see how to sort the result of an ZopeFind ...

But hopefully I am still a little blind and someone can help - Thanks

Kai
=20
--=20
Institut f=FCr Seeverkehrswirtschaft und Logistik   http://www.isl.org/
Dipl.-Inform. Kai Hofmann                       mailto:hofmann@isl.org
Universitaetsallee GW1 Block A                   phone:+49 421 22096-83
D-28359 Bremen                                     fax:+49 421 22096-55