[Zope] Complex dtml-in/ZopeFind ?
Thu, 03 May 2001 21:53:37 +0200
thats simple. You have too much logic in your dtml.
First of all I would do it rather with a zcatalog search,
since this would not call all documents (e.g. load them
into memory) and gives you the flexibility on choosing
whatever subset you want.
If not, you should put all your search stuff into a
python script, which returns a list of
only the objects you want.
If you use query-start/end you could as well put the
<table> </table> stuff there as well.
If you dont, you can drop these lines and put
them all outside, so there is no need to see how
many items are returned.
--On Donnerstag, 3. Mai 2001 11:27 +0200 Kai Hofmann <email@example.com> =
> I have the following code now:
> <dtml-in "subdir.objectValues('DTML Document')"
> sort=3Dbobobase_modification_time reverse>
> <dtml-if sequence-start>
> <dtml-if "(startdate <=3D _.DateTime()) & (_.DateTime() <=3D =
> <h2><dtml-var title></h2>
> <dtml-var sequence-item>
> <dtml-if sequence-end>
> the problem here is that the sequence-start/end will always be executed -
> for 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 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
> the other 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
> Institut f=FCr Seeverkehrswirtschaft und Logistik http://www.isl.org/
> Dipl.-Inform. Kai Hofmann mailto:firstname.lastname@example.org
> Universitaetsallee GW1 Block A phone:+49 421 22096-83
> D-28359 Bremen fax:+49 421 22096-55
> Zope maillist - Zope@zope.org
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-dev )