[Zope] R: [Zope] accessing lists from dtml

Marcel Preda marcel@punto.it
Wed, 7 Jun 2000 20:05:24 +0200


> Hello all,
>
> If I have a REQUEST variable that equals a list, like this:
>
> ['ITEM_NUMBER','PRICE']
>
> How would I get ITEM_NUMBER and PRICE into separate variables?
>
> The following code gives me a screen full of the appropriate values (using an
external
> method), but I can't figure out how to use the results:
>
> <dtml-in "parseCSV()">
> <dtml-var sequence-item><BR>
> </dtml-in>
>
> Displays:
> ['003020','149.95']
> ['003021','79.99']

Must be something like (untested , but should work , I hope):

<dtml-in "parseCSV()">
<dtml-var "_['sequence-item'][0]"><BR>
<dtml-var "_['sequence-item'][1]"><BR>
</dtml-in>

PM