[Zope] What to do when an External Method returns a dictionary

Morten W. Petersen mpeters@online.no
Wed, 29 Sep 1999 01:20:59 +0200


Jeffrey Shell wrote:
> 
> > <!--#var "core.newcurrenttime(nowtime())"--> returns a list,
> > however, I can't seem to fetch the variables it returns.. :\
> >
> > Any ideas, a pointer to the relevant python code, etc.?
> 
> If it returns a dictionary, use dtml-with
> 
> <dtml-with expr="core.newcurrenttime(nowtime())" mapping>
>  <dtml-var key1>, <dtml-var keyfoo>
> </dtml-with>
> 
> If it returns a list (sequence), use dtml-in.  If it's a list of
> dictionaries, use the mapping attribute on the dtml-in tag (this lets
> the dtml-in and dtml-in tags know to use getitem instead of getattr).

Ah, how lame of me (mapping).

Thankyouverymuch.