[Zope-dev] Suggestion for DT_In
Johan Carlsson
johanc@easypublisher.com
Fri, 18 Jul 2003 11:56:34 +0200
Hi,
I found a small change that can solve a problem with
sort_expr in dtml-in.
There is no way to let the dtml-in not sort when
using sort_expr. This would be a good thing if you
want to be able to choose the default order of
the sequence:
A small patch to DT_In enables the dtml-in to
ignore sorting if the result of the expression is None.
if self.sort_expr is not None:
self.sort=self.sort_expr.eval(md)
- sequence=self.sort_sequence(sequence, md)
- elif self.sort is not None:
+ if self.sort is not None:
sequence=self.sort_sequence(sequence, md)
This patch needs to be done in to places:
renderwb and renderwob as far as I can see.
--
Johan Carlsson Tel: + 46 8 31 24 94
Colliberty Mob: + 46 70 558 25 24
Torsgatan 72 Email: johanc@easypublisher.com
SE-113 37 STOCKHOLM