[Zope] Using lists in DTML
Ken Kinder
kkinder@messagemedia.com
Wed, 05 Apr 2000 14:02:51 -0600
Say I have two iterations like this:
<ul>
<dtml-in ..>
<li>..
</dtml-in>
<dtml-in ..>
<li>..
</dtml-in>
</ul>
That use two different SQL queries, but return rows from the same
table. Logically, to the user, these iterations render just one
lists. How would I eliminate duplicates created by querying the
same table?
One thought is, but I'm not sure how to go about doing it, is to
store a list of keys already displayed. Something like this
(create a list named foo)
<ul>
<dtml-in ..>
<li>..
(add id to list foo)
</dtml-in>
<dtml-in ..>
(check to see if id is in list foo from last dtml-in)
(if id is in list, skip)
</dtml-in>
</ul>
Any ideas on what syntax I would use for that?
--
Ken Kinder
303.381.7631