> You can use something like: > > <dtml-if "orderby=='firstname'"> > <dtml-in "sql_search(search='foo')" sort=firstname> > <dtml-elif "orderby=='lastname'"> > <dtml-in "sql_search(search='foo')" sort=lastname> > </dtml-if> For Zope.2.3.0+ you can use: <dtml-in "sql_search(search='foo')" sort_expr="orderby"> -- Adam Karpierz karpierz@alpha.pl