[Zope-CMF] Portal Catalog Date Matching

Tres Seaver tseaver@zope.com
Thu, 17 Jan 2002 10:49:52 -0500


Walker, Byl wrote:

> Howdy all --
> 
>  
> 
> I'm trying to pull portal content based on the effective date of an item 
> matching the current date.  This is my search call:
> 
>  
> 
>  
> 
> <dtml-in "portal_catalog.searchResults(meta_type='CMF Quotes',
>                             review_state ='published',
>                             sort_on = 'Date',
>                             sort_order = 'reverse',
>                             effective_date = 'effective_date.isCurrentDay()'

                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
should be:
                               effective=( ZopeTime().earliestTime()
                                         , ZopeTime().latestTime()
                                         ),
                               effective_usage="range:min:max"

>                             )">
> 
> Since I am asking this question, you will all know that this isn't 
> working.  Any idea what I should be putting on the other side of 
> "effective_date = "?


Or something to that effect (I would actually put this in a
PythonScript, and have the DTML call the script to get the
results back).

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com