[ZPT] repeat trick

Peter Bengtsson mail@peterbe.com
Tue, 10 Jul 2001 16:32:36 +0200


Please have a look at
http://www.zope.org/Members/peterbe/DTML2ZPT/#example13

This is the code I'm having problems with::

 <textarea name="users:list"
    tal:define="users here/getUsers | nothing; string modules/string"
    tal:content="python:string.join(users,'\n')"></textarea>

First is defines what 'users' is by that function, and if not found, it's
defined as 'nothing'.
This is wrong because 'nothing' can't be looped over.
What I theoretically wanted to do was this:

  tal:define="users here/getUsers | []"

but that's not permitted.

How to do?

Cheers, Peter