[Zope] Sorting case-insensitivly

Casey Duncan cduncan@kaivo.com
Tue, 14 Aug 2001 12:00:05 -0600


Peter Bengtsson wrote:
> 
> In the ZMI all the objects are by default sorted alphabetically starting
> with Capital A and ending with small z.
> What if you don't want it to be case sensitive? It's prett darn ugly the way
> it is at the moment.
> 
> I do something like this:
> 
> <dtml-in GetLotsOfObjects sort=id>
> 
> And it returns
> 
> Peter
> Zope
> bengtsson
> rocky
> 
> When I'd like it to be:
> 
> bengtsson
> Peter
> rocky
> Zope
> 
> Cheers,
> Peter
> 

Be careful. The last time this got brought up, it nearly became a
religious debate... 8^)

There is a way to substitute a sorting expression in dtml-in which
allows this. I think something like this might work:

<dtml-in Lots_o_objects sort_expr="_.string.lower(id)">

hth,
-- 
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>