I can create a dtml-in filte with the following code:
return [doc for doc in context.objectValues('DTML Document')  if
How can I do the same with a date or time ?
Martin Koekenberg

-----Original Message-----
From: Tino Wildenhain <[EMAIL PROTECTED]>
To: Martin Koekenberg <[EMAIL PROTECTED]>
Cc: zope@zope.org
Date: Wed, 08 Mar 2006 14:43:41 +0100
Subject: Re: [Zope] DTML-In with filter

Martin Koekenberg schrieb:
> Hello,
> Is it possible to use a DTML-In to display all DTML Documents in a
> folder exept the one's with a centain value in a property ?
> Example.
> DTML Document one with property a=bc
> DTML Document two with property a=de
> DTML Document three with property a=bc
> Now I want to use DTML-IN to display all the dtml documents except the
> ones with property a=de.
> I also use the size and batchsize property to create links to the next
> 10 documents..... If I use an if statement the next 10 can be 9 ore
> less 9 items because there could be one ore more documents with a=de.

Just drop this DTML... or at least get help from python:

return [doc for doc in context.objectValues('DTML Document')  if

(python script or the like would be your friend - also
it makes it possible to replace the quite costy objectValues()
call with ZCatalog query w/o changing your presentation code)

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to