[Zope] ZPT-How to sort by type and then title or id
Jordan Carswell
jordan.carswell@hccs.edu
Wed, 23 Jul 2003 18:45:37 -0500
I wanted to create a listing for a folder that sorted first by the type
of item and secondly by title. I found this example for sorting by
title, but I can't figure out how to get it to sort by type first. Any
guidance is appreciated...
<tal:block define="item
python:here.getFolderContents(suppressHiddenFiles=1); dummy
python:item.sort(lambda a,b:cmp(a.title_or_id(), b.title_or_id()))"
tal:repeat="items item">