[Zope] CMF & searchResults

marc lindahl marc@bowery.com
Wed, 31 Oct 2001 16:49:43 -0500


This is from events_box.dtml:

    <dtml-in "portal_catalog.searchResults( meta_type=3D'CMF Event'
                                        , sort_on=3D'start'
                                        , sort_order=3D'reverse'
                                        , review_state=3D'published'
                                        )" size=3D"10" skip_unauthorized>
   <tr class=3D"NewsItemRow">
   <td valign=3D"top">
    <a href=3D"<dtml-var "getURL()"
    >"> &dtml-Title; </a><br>
    <dtml-var start>
   </td>
   </tr>
   <dtml-else>
   <tr class=3D"NewsItemRow">
   <td valign=3D"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
>=20
> This isn't exactly what you asked for, but try something like (untested):
>=20
> created =3D '7'
> created_usage =3D 'range:min'
>=20
> To get items less than 7 days old.
>=20
> 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
>=20
> <dtml-let d=3D"_.string.atoi('7')">
>=20
> portal_catalog.searchResults( meta_type=3D'News Item'
> , sort_on=3D'Date'
> , sort_order=3D'reverse'
> , review_state=3D'published'
> , created =3D d
> , created_usage =3D 'range:min'
> ))
>=20
> </dtml-let>
>=20
> -Scott
>=20
> -----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
>=20
>=20
> I search a way to do a searchResults
> with a min/max date criteria.
> like this:
>=20
> portal_catalog.searchResults( meta_type=3D'News Item'
> , sort_on=3D'Date'
> , sort_order=3D'reverse'
> , review_state=3D'published'
> <<< , Date > myDate >>>
> ))
>=20
> Do you know the right syntax for this?
>=20
> ___________________________________________________________
> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran=E7ais !
> Yahoo! Courrier : http://courrier.yahoo.fr
>=20
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -=20
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>=20
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -=20
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )