21 Jun
2006
21 Jun
'06
9:35 p.m.
Alric Aneron wrote at 2006-6-19 09:35 -0700:
... contents of myscript(): mydict = {'key1': 'value1', 'key2': 'value2'} mydict2 = {'key1': 'value3', 'key2': 'value4'} finalList = [mydict, mydict2] return finalList
When I do this in a dtml-method: <dtml-in "myscript()"> <dtml-var key1> <br/> </dtml-in> This will not return me this: value1 value2 It gives me a key error.
You should tell the "dtml-in" that it is iterating over a sequence of "mapping" objects. You do this with its "mapping" attribute. -- Dieter