[Zope] dtml-in and maps...
Marcel Preda
marcel@punto.it
Wed, 12 Jul 2000 09:33:55 +0200
----- Original Message -----
From: Curtis Maloney <curtis@umd.com.au>
> > I suppose that your var is a dictionary
> >
> Well.. this is where things start to get fun. (o8
>
> I have a dirty great array.... along the lines of :
>
> [ [ 'string', 0, { 'name':'value' } ], [ 'string', 0, { 'name':'value' } ] ]
>
> (I love python.. the same thing in C/C++ would take HEAPS of work :)
>
> So, I iterate over the array... that's working fine...
> Then, for each iteration, I handle the data however...
> I wind up with:
>
> <dtml-in "_['sequence-item'][2]">
> <!-- do stuff here -->
> </dtml-in>
>
> But that's where the problem begins.
Yes in did the "_['sequence-item'][2]" is a dictionary.
You can do like
<dtml-in "[_['sequence-item'][2]]">
<!-- do stuff here -->
</dtml-in>
(untested :0)
but why not without <dtml-in> ...
<!-- do stuff here with "_['sequence-item'][2]['name']"-->
PM