[Zope] sort=expr

Jim Fulton jim@digicool.com
Mon, 09 Aug 1999 08:41:16 -0400


jpreston@tdg.com.au wrote:
> 
> Hello, hope you're all well,
> 
>      I want to do this:
> 
> <!--#in expr="objectValues(spec='Folder')" sort=expr="_[sort_order]"-->
> 
> I think I do anyway. The value of the property sort_order is a string that is
> the id of yet another property, and I want to pass that id as the #in "sort"
> parameter.
> 
> The code above doesn't work of course. How can I pass the result of an expr as a
> parameter? 

I can't think of a way.

> Is it just correct syntax that I'm lacking?

No.  The sort attribute wants a name, not the name of a variable (or expression)
containing the name.

I think this should be fixed somehow.  In fact, I think it should be fixed in
2.1 (2.0 is feature frozen). I suggest making a featire request in the collector.

Jim

--
Jim Fulton           mailto:jim@digicool.com   Python Powered!        
Technical Director   (888) 344-4332            http://www.python.org  
Digital Creations    http://www.digicool.com   http://www.zope.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.