Thanks Gilles.  I will look into that.<br><br>For the time being, I just added a new script to my theme product that mimics getFolderContents(), but does the date sorting that I described, and made a corresponding template to leverage it (and do some custom formatting).  The only downside is that I can&#39;t readily just apply this to collection objects, since they have their own query implementation.  I&#39;m still thinking about how to handle things for collections.<br>

<br>-David<br><br><div class="gmail_quote">On Thu, Jun 25, 2009 at 05:57, Gilles Lenfant <span dir="ltr">&lt;<a href="mailto:gilles.lenfant@ingeniweb.com">gilles.lenfant@ingeniweb.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Le 24 juin 09 à 21:36, David Hostetler a écrit :<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39;m looking for some advice about how to approach the following problem I have related to a theme product I&#39;m developing:<br>
<br>
I need to display folder contents sorted by publication date, which would be easy enough, except that I need creation date to be used in the event that an object does not have a publication date.<br>
<br>
What&#39;s the best way to tackle this?  I can&#39;t just deal with the subset of stuff that getFolderContents() returns, because that&#39;s already had batching applied, so I wouldn&#39;t be dealing with the full set of folder contents, and I don&#39;t want to just turn batching off.<br>


<br>
If I didn&#39;t know better I&#39;d say that I need a special catalog index that is equivalent to: (effective_date or creation_date).  If that existed for all objects, then I could just let the normal getFolderContents() function do its magic by ensuring that I give it a {&#39;sort_on&#39;:&#39;effective_or_creation_date&#39;} as the contentFilter.<br>


<br>
Any other ideas?<br>
</blockquote>
<br></div>
Hi,<br>
<br>
Plone 3.3 ships with plone.indexer that addresses this kind of use case. It may or may not (untested by myself) work with older Plone 3.x.<br>
<br>
<a href="http://plone.org/products/plone/roadmap/239" target="_blank">http://plone.org/products/plone/roadmap/239</a><br>
<a href="http://pypi.python.org/pypi/plone.indexer/" target="_blank">http://pypi.python.org/pypi/plone.indexer/</a><br>
<br>
HTH<br>
-- <br><font color="#888888">
Gilles Lenfant<br>
<br>
</font></blockquote></div><br>