Oh yeah for the ZCatalog I have two indexes one upper case and one lower
case for some of my classes. No problemo. My area to attack though is the
standard views such as the management interface...

How's life in Lancaster? Went to school there and grew up in Garstang....

  Andy McKay, Developer.

----- Original Message -----
From: "Steve Alexander" <[EMAIL PROTECTED]>
To: "Andy McKay" <[EMAIL PROTECTED]>
Sent: Wednesday, December 06, 2000 11:03 AM
Subject: Re: [Zope-dev] case insensitive sorts

> Andy McKay wrote:
> > Minor nit and patch: I've found that really for me what users want to
see is
> > a case insensitive sort of objects, not the current python case
> > sort. So that the order of objects from dtml-in and tree is a, A, b, B
> > apposed to A, B, a, b.
> >
> > Anyway Ive patched dtml-in and dtml-tree to do this sort on a
> > tag. Is this useful to anyone else? And Ive thought of patching my Zope
> > this is the default behaviour.... what does anyone else think. The next
> > thing to patch is ZCatalog...
> The way I approached this was to have a ZPatterns attribute provider, or
> a method, that provides a modified version of the value I want to sort on.
> For example, I have a load of documents and folders with titles like
>   Big Folder
>   brown document
>   "Berries for Cooking" list
> I wanted to present these sorted by non-case-sensitive first letter or
> number. So, I made a method "title_for_sorting" that stripped off any
> punctuation at the start, and returned the first 20 characters in all
> lower case.  In this case, as it was a ZPatterns application, the method
> was presented as an attribute of the object using some skin-script. I
> used this attribute as a field-index in my SiteIndex ZCatalog.
> The reason I mention this is that sometimes case-insensitivity is not
> enough for sensible sorting. In this case, I had to strip out
> punctuation too.
> --
> Steve Alexander
> Software Engineer
> Cat-Box limited
> http://www.cat-box.net

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to