[ZPT] tal:repeat and variables
Thu, 13 Feb 2003 01:11:58 -0600
Clemens Robbenhaar wrote:
> I don't think there is a better way. The tal:repeat is just designed in
> a way that all elements in a repeat are rendered nearly independent of
> each other.
> Despite it is actually presentation logic and not application logic, I
> would tend to filter the result set through a python script, replacing
> the unwanted entries by empty strings. I did not work with SQL result
> sequences, but I guess one maybe has to make a copy of the result
> sequence, as the original sequence may be immutable.
I'd have to agree: this is a job for a python script. I would make a
dictionary of tuples (or lists) like this:
<tr tal:repeat="d data[k]">
The code is untested, but I hope that helps you out...