[Zope] Returning lists of tuples

Evan Simpson evan@4-am.com
Mon, 28 Feb 2000 13:25:15 -0600


----- Original Message -----
From: James W. Howe <jwh@allencreek.com>
> <dtml-return "[('Go Here', 'foo.bar.com') , ('Go Somewhere Else',
> 'baz.foo.com')]">
>
> I would like to do something like this with this result:
>
> <dtml-in urltags>
> <a href="< url part from tuple >">< display part of tuple ></a>
> </dtml-in>

dtml-in has a special case for lists of two-tuples like this.  It makes the
first element of each tuple 'sequence-key' and the second 'sequence-item'.
Try...

<a href="&dtml-sequence-item;">&dtml-sequence-key;</a>

Cheers,

Evan @ 4-am & digicool