[Zope] - iterative sorting w/dtml
Jim Fulton
jim@Digicool.com
Wed, 09 Dec 1998 01:24:24 +0000
Kent Polk wrote:
>
> when using:
> <!--#in obj sort='name'-->
>
> How can one filter the 'name' list prior to sorting?
> For example, to lower(case) the values, but I am
> looking for a more general solution.
The argument given to sort could be a method
name:
<!--#in obj sort=nameLower-->
def nameLower(self): return lower(name)
or a computed attribute, as Phillip suggested.
Jim
--
Jim Fulton mailto:jim@digicool.com
Technical Director (540) 371-6909 Python Powered!
Digital Creations http://www.digicool.com http://www.python.org
Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission. Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.