[Zope-CMF] concrete example of using path in portal_catalog search?

alan runyan alan runyan" <runyaga@runyaga.com
Tue, 29 Oct 2002 11:15:24 -0600


http://www.zopelabs.com/cookbook/1001898394

----- Original Message ----- 
From: "Mark McEahern" <mark@mceahern.com>
To: "Zope-Cmf Mailing List" <zope-cmf@zope.org>
Sent: Tuesday, October 29, 2002 9:03 AM
Subject: [Zope-CMF] concrete example of using path in portal_catalog search?


> Does anyone have a concrete example of restricting a portal_catalog search
> to a specific path?  I.e., how do I modify the following to display
> published News Items from folder /x/y/z?
> 
> <div tal:define="results python:here.portal_catalog(
>   portal_type='News Item',
>   sort_on='Date',
>   sort_order='reverse',
>   review_state='published')">
>   <div tal:repeat="obj results">
>     ... do something with obj
>   </div>
> </div>
> 
> Related question:  Does the above "honor" the expiration date and do not
> publish until dates--or do I have to be explicit about that?  Admittedly,
> this question seems easy to test.
> 
> Thanks,
> 
> // mark
> 
> -
> 
> 
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
> 
> See http://collector.zope.org/CMF for bug reports and feature requests
>