At 01:50 PM 2/28/00 -0500, Kevin Dangoor wrote:
----- Original Message ----- From: "James W. Howe" <jwh@allencreek.com> To: <zope@zope.org> Sent: Monday, February 28, 2000 1:07 PM Subject: [Zope] Returning lists of tuples
I've got situation where I want a dtml-method to return a list of tuple objects. I then want to iterate over the tuples using a dtml-in construct, displaying the various parts of the tuple. [...]
(untested):
<dtml-in urltags> <a href="<dtml-var "_['sequence-item'][1]">"><dtml-var "_['sequence-item'][0]"></a> </dtml-in>
The syntax is somewhat verbose, but should do the trick just fine.
Before I received your message, I tried the following (which also seems to work): <dtml-in urltags> <a href="<dtml-var sequence-item>"><dtml-var sequence-key></a> </dtml-in> I'm not entirely sure why this works. Your code makes more sense (although it is more verbose) James W. Howe mailto:jwh@allencreek.com Allen Creek Software, Inc. pgpkey: http://ic.net/~jwh/pgpkey.html Ann Arbor, MI 48103