29 Mar
2000
29 Mar
'00
12:31 a.m.
What kind of result do I need to return from a python method in order for the return value to be usable by <dtml-in> ?
In other words, I want to do:
def blah(self): l = [{val : 'blah1'}] return l
Here's one way to do it. There may be others: <dtml-in blah mapping> <dtml-var _['sequence-item']['val']> </dtml-in> The 'mapping' parameter to dtml-in causes it to treat the sequence items as mappings instead of instances. Then "_['sequence-item']" refers to the dictionary object and "_['sequence-item']['val']" refers to the 'val' element of that dictionary. -jfarr