[Zope] Sort by property, then match all docs w/property

Keith J. Farmer kfarmer@thuban.org
Wed, 9 Jan 2002 14:57:18 -0800


Here's a solution similar to what you'd need (taken from
http://sportsters.thuban.org/Trips).. note the first-<var>/last-<var>:
I had to dig to find out that these existed.  You don't even need a temp
variable to handle it.

<dtml-in expr=3D"PARENTS[0].objectValues('Folder')"
sort=3D"cat,title_or_id">

<dtml-if first-cat>
<h3><dtml-var cat></h3>

<dl>
</dtml-if>

<dt><a href=3D"<dtml-var absolute_url>"><dtml-var title_or_id></a></dt>
<dtml-if info><dd><dtml-var info></dd></dtml-if>

<dtml-if last-cat>
</dl>

</dtml-if>

</dtml-in>


----------=20
Keith J. Farmer=20
kfarmer@thuban.org=20
http://www.thuban.org=20
-----Original Message-----
From: cgreen [mailto:cgreen@ttsg.com]
Sent: Wednesday, January 09, 2002 14:39
                             =20
What I'd like to do next is grab each property in a variable to compare
against the value=20
of the *next* iteration. If it matches, don't print the topic name in
the table header. If it doesn't match, print the topic name and set the
temp variable to the new value.=20