[Zope] cascading dictionaries in dtml
Tino Wildenhain
tino@wildenhain.de
Fri, 27 Jul 2001 21:11:34 +0200
hi,
--On Freitag, 27. Juli 2001 18:24 +0000 redaguermas@yahoo.com wrote:
> I am building a dictionary in an external method:
>
> dict = {'user_name':'jim', 'password':'powers'}
>
> I also add it to the request using:
> container.REQUEST.set('results', dict)
>
> The problem is that I am unable to retrive the results dictionary on
> my dtml document. When I do: <dtml-var "REQUEST.get('results')"> I
> can see my dictionary but I am not able to get the individual values
> in the dictionary.
> Nothing worked so far. I guess it's a case of cascading dictionaries
> in dtml document.
No, thats no problem. Just use
<dtml-in expr="results.items()">
<dtml-var sequence-key>:<dtml-var sequence-item><br>
</dtml-in>
HTH
Tino