[Zope] Reformatting <dtml-tree>
Keith J. Farmer
kfarmer@thuban.org
Tue, 23 Oct 2001 00:18:15 -0700
Very simple, you'd think..
How does one insert an extra (blank) row in a dtml tree, based on a
change of property value? Alternatively, how does one alter a value
originally defined in a dtml let statement?
I'm wanting to group items in the tree, visually.
The following does NOT work (order is the property being tested, x is
used to hold the previous value):
<a HREF=3D"<dtml-var URL0>?expand_all=3D1">Expand all</a> |
<a HREF=3D"<dtml-var URL0>?collapse_all=3D1">Collapse all</a>
<br>
<dtml-let x=3D0>=20
<dtml-tree content branches_expr=3D"objectValues(['Folder','Link'])"
sort=3D"order">
<dtml-if "meta_type=3D=3D'Folder'">
<dtml-if expr=3D"order !=3D x"><br><dtml-call =
expr=3D"x=3Dorder"></dtml-if>
<IMG SRC=3D"<dtml-var icon>" BORDER=3D0> <dtml-var title_or_id>
<dtml-else>
<b><dtml-var expr=3D"getLink(absolute_url(1))"></b>
</dtml-if>
<dtml-if description><i class=3Dfooter><dtml-var
description></i></dtml-if>
</dtml-tree>
</dtml-let>
----------
Keith J. Farmer
kfarmer@thuban.org
http://www.thuban.org