I have a bunch of zClass instances and I want to display only the ones that
match all three criterion (approved=1, goLiveDate<=ZopeTime(), expired=0).
I'm not exactly sure how to do this. I have tried <dtml-if> statements
inside the <dtml-in></dtml-in> statements but the "in", even though it does
not show the files that don't match, still counts all of them which messes
up the next and previous. How do I write my code to correctly show and count
only the matching instances?

I have searched both the zope.org site and the eGroups list for the answer
and if it is there I can't find it :-( 

Thanks!!

Jamey

Here is the code.

<dtml-in "PARENTS[0].objectValues(['PressRelease'])" sort="goLiveDate"
reverse size="5" start="batch_start" next>
 <p>
 <a
href="&dtml-URL;&dtml-sequence-query;batch_start=&dtml-next-sequence-start-n
umber;">
 Next &dtml-next-sequence-size; older Releases
 </a>
</dtml-in>

<dtml-in "PARENTS[0].objectValues(['PressRelease'])" sort="goLiveDate"
reverse size="5" start="batch_start">
 <dtml-if "goLiveDate <= ZopeTime">
  <p><b><a href="<dtml-var "id">/release.html">
    &dtml-pr_title;
   </a></b> - <dtml-var goLiveDate fmt="%m/%d/%Y"><br>
    <font size="2">&dtml-summary;</font>
   </p>
 </dtml-if>
</dtml-in>

<dtml-in "PARENTS[0].objectValues(['PressRelease'])" sort="goLiveDate"
reverse size="5" start="batch_start" previous>
<p>
 <a
href="&dtml-URL;&dtml-sequence-query;batch_start=&dtml-previous-sequence-sta
rt-number;">
 Next &dtml-previous-sequence-size; more recent Releases
 </a>
</dtml-in>

_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to