[Zope] Using DTML - I'm too stupid

Oleg Broytmann phd@sun.med.ru
Sun, 11 Apr 1999 15:12:28 +0400 (MSD)


On Sat, 10 Apr 1999, Oliver Thuns wrote:
> But I have another little problem. I have a array of dictonaries
> 
> {'Pos': [{'a': '123', 'b': '456', 'c': '789'}, {'a': '321', 'b': '654',
> 'c': '987'}]}
> 
> and I want to iterate over this array:
> 
> <!--#in Pos-->
>   <!--#var ???-->
> <!--#/in-->

   Usually I do it as follows:

Pos = [{'a': '123', 'b': '456', 'c': '789'}, {'a': '321', 'b': '654', 'c': '987'}]

<!--#in Pos-->
   <!--#var a-->
   <!--#var b-->
   <!--#var c-->
<!--#/in-->

   Look into examples 4 and 6 that I've sent to you.

> What variable name must I use. "a" (b,c) and sequence-item['a'] doesn't
> work.

   If you want to use sequence-item, this is the way:
<!--var "_['sequence-item']['a']"-->

> I only read the DTML User's Guide, are there other docs, which describe
> DTML?

   I havn't read anything special - just DTML Guide (and even it I havn't
read too careful :) and this mailing list. And just a little brain, but I
hope most of us have it :)))

> Oliver

Oleg.
---- 
    Oleg Broytmann  National Research Surgery Centre  http://sun.med.ru/~phd/
           Programmers don't die, they just GOSUB without RETURN.