[Zope] Sorting a list of folders based upon PART of the folder id
mclinden@informed.net
mclinden@informed.net
Wed, 18 Jun 2003 12:35:11 -0400
Thanks to Max and others, I have gotten closer to the final goal. My
apologies to those who might be bored by the question...
I have defined the Python Script "dsuJudgeSort" (with parameter jlist) as:
decorated = [(o.getId()[-1], o.getId()[0]) for o in jlist]
decorated.sort();
return [d[-1] for d in decorated]
And a ZPT with
<table
tal:define="sorted_objects
python:container['dsuJudgeSort'](here.objectValues('Plone Folder'));"
>
and get:
TypeError: sequence index must be integer
Suggestions or help are appreciated.
Sean McLinden
Allegheny County Health Department