[Zope] Sorting a list of folders based upon PART of the folder id

mclinden@informed.net mclinden@informed.net
Tue, 17 Jun 2003 15:23:21 -0400


I have an application where a front-end constrains the ids of created 
folders so that they have some significance to the application. I'd like 
to be able to sort these folders using Python's sort facility, but I am 
having problems doing this within a Zope Page Template.

As an example, I would like to be able to do an alphabetic sort of the 
folder IDs based upon the concatenation of the last and first characters 
of the idea. I suppose that I could create a Python module to do this, but 
I was hoping for a slick way to do it entirely within Zope. 

Suggestions appreciated.

Also, has anyone written a SQL-like ORDER-BY or GROUP-BY sort routine for 
Zope/Python?

Sean McLinden
Allegheny County Health Department