[Product-Developers] creating a chronological folder listing

David Hostetler negativesum at gmail.com
Wed Jun 24 19:36:43 UTC 2009


I'm looking for some advice about how to approach the following problem I
have related to a theme product I'm developing:

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.

What's the best way to tackle this?  I can't just deal with the subset of
stuff that getFolderContents() returns, because that's already had batching
applied, so I wouldn't be dealing with the full set of folder contents, and
I don't want to just turn batching off.

If I didn't know better I'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
{'sort_on':'effective_or_creation_date'} as the contentFilter.

Any other ideas?

And if not - what's the plone3 best practice for creating a new catalog
index?


thanks,

-David Hostetler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20090624/085e7c92/attachment.html>


More information about the Product-Developers mailing list