[Zope] Page Template --> tal:repeat

Chris Meyers chris@hddesign.com
Thu, 25 Jul 2002 13:14:15 -0500

On Thu, Jul 25, 2002 at 01:09:40PM -0400, "Echeverria Rabi, Cristián" wrote:
> I need to do something like this
> <tr tal:repeat="row python:range(value)">
> But value come from another template with a form.
> I always have the same error:
> Error Type: TALESError
> Error Value: exceptions.NameError on global name 'value' is not defined in
> '', at line 14, column 5
> I don't know how to solve this. I want to iterate over a sequence produced
> by a python script, but I can't pass an argument to the script that came
> from a form in another page.
> Thanks for any help
> Cristian

Assuming that value is part of the request namespace you could do something like:
<tr tal:define="value reques/value" tal:repeat="row python:range(value)">


Chris Meyers
Huttleston Data Design