<HTML>
<HEAD> <META http-equiv=Content-Type content="text/html; charset=utf-8">
<STYLE title="table borders">.htmtableborders, .htmtableborders td,
.htmtableborders th {border : 1px dashed lightgrey ! important;} </STYLE>
<STYLE type=text/css>html, body { border: 0px; } span.macro, span.macro ul,
span.macro div, span.macro p {background : #CCCCCC;} </STYLE> <STYLE
type=text/css> p{margin-bottom: 0.15em;margin-top:
0.15em;}body{font-family:tahoma;font-size:10pt;}; </STYLE> </HEAD> <BODY>
<FONT style="FONT-SIZE: 10pt; FONT-FAMILY: tahoma"> <DIV> </DIV> <DIV>
Hallo,</DIV> <DIV>I can create a dtml-in filte with the following
code:</DIV> <DIV> </DIV> <DIV>return [doc for doc in
context.objectValues('DTML Document') if <BR>
doc.getProperty('a')!='de'] </DIV> <DIV> </DIV> <DIV>How can I do
the same with a date or time ?</DIV> <DIV> </DIV> <DIV>Regards,</DIV>
<DIV> </DIV> <DIV>Martin Koekenberg</DIV> <DIV> </DIV> <DIV>
</DIV></FONT><BR> <BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT:
5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
-----Original Message-----<BR>From: Tino Wildenhain
<tino@wildenhain.de><BR>To: Martin Koekenberg
<martin@digital-adventures.nl><BR>Cc: zope@zope.org<BR>Date: Wed, 08
Mar 2006 14:43:41 +0100<BR>Subject: Re: [Zope] DTML-In with filter<BR><BR>
<DIV style="FONT-FAMILY: monospace, courier new, courier">Martin Koekenberg
schrieb:<BR>> Hello,<BR>> <BR>> Is it possible to use a
DTML-In to display all DTML Documents in a <BR>> folder exept the one's
with a centain value in a property ?<BR>> <BR>> Example.<BR>>
<BR>> DTML Document one with property a=bc<BR>> DTML Document
two with property a=de<BR>> DTML Document three with property a=bc<BR>
> <BR>> Now I want to use DTML-IN to display all the dtml
documents except the <BR>> ones with property a=de.<BR>> I also use
the size and batchsize property to create links to the next <BR>> 10
documents..... If I use an if statement the next 10 can be 9 ore <BR>>
less 9 items because there could be one ore more documents with a=de.<BR><BR>
Just drop this DTML... or at least get help from python:<BR><BR>return [doc
for doc in context.objectValues('DTML Document') if <BR>
doc.getProperty('a')!='de']<BR><BR>(python script or the like would be your
friend - also<BR>it makes it possible to replace the quite costy
objectValues()<BR>call with ZCatalog query w/o changing your presentation
code)<BR><BR>Regards<BR>Tino<BR></DIV></BLOCKQUOTE></BODY>
</HTML>