RE: [Zope] CMF & searchResults
This isn't exactly what you asked for, but try something like (untested): created = '7' created_usage = 'range:min' To get items less than 7 days old. It may be that the '7' is handled as a string, and not a number. In that case you will need to do something like <dtml-let d="_.string.atoi('7')"> portal_catalog.searchResults( meta_type='News Item' , sort_on='Date' , sort_order='reverse' , review_state='published' , created = d , created_usage = 'range:min' )) </dtml-let> -Scott -----Original Message----- From: Joel Brueziere [mailto:joelbrueziere@yahoo.com] Sent: Wednesday, October 31, 2001 7:36 AM To: Zope@zope.org Subject: [Zope] CMF & searchResults I search a way to do a searchResults with a min/max date criteria. like this: portal_catalog.searchResults( meta_type='News Item' , sort_on='Date' , sort_order='reverse' , review_state='published' <<< , Date > myDate >>> )) Do you know the right syntax for this? ___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Courrier : http://courrier.yahoo.fr _______________________________________________ Zope maillist - Zope@zope.org 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 )
This is from events_box.dtml: <dtml-in "portal_catalog.searchResults( meta_type='CMF Event' , sort_on='start' , sort_order='reverse' , review_state='published' )" size="10" skip_unauthorized> <tr class="NewsItemRow"> <td valign="top"> <a href="<dtml-var "getURL()" >"> &dtml-Title; </a><br> <dtml-var start> </td> </tr> <dtml-else> <tr class="NewsItemRow"> <td valign="top"> No New Events. </td> </tr> </dtml-in>
From: "Meilicke, Scott" <scott.meilicke@intp.com> Date: Wed, 31 Oct 2001 13:36:58 -0800 To: "'Joel Brueziere'" <joelbrueziere@yahoo.com>, Zope@zope.org Subject: RE: [Zope] CMF & searchResults
This isn't exactly what you asked for, but try something like (untested):
created = '7' created_usage = 'range:min'
To get items less than 7 days old.
It may be that the '7' is handled as a string, and not a number. In that case you will need to do something like
<dtml-let d="_.string.atoi('7')">
portal_catalog.searchResults( meta_type='News Item' , sort_on='Date' , sort_order='reverse' , review_state='published' , created = d , created_usage = 'range:min' ))
</dtml-let>
-Scott
-----Original Message----- From: Joel Brueziere [mailto:joelbrueziere@yahoo.com] Sent: Wednesday, October 31, 2001 7:36 AM To: Zope@zope.org Subject: [Zope] CMF & searchResults
I search a way to do a searchResults with a min/max date criteria. like this:
portal_catalog.searchResults( meta_type='News Item' , sort_on='Date' , sort_order='reverse' , review_state='published' <<< , Date > myDate >>> ))
Do you know the right syntax for this?
___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Courrier : http://courrier.yahoo.fr
_______________________________________________ Zope maillist - Zope@zope.org 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 )
_______________________________________________ Zope maillist - Zope@zope.org 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 )
participants (2)
-
marc lindahl -
Meilicke, Scott