[Zope] dtml-tree based on a recursive SQL table

Martijn Pieters mj@antraciet.nl
Tue, 19 Oct 1999 10:19:33 +0200


At 03:48 19/10/99 , Philipp Auersperg wrote:
>Steen,
>Thanks for your answer, I did the following:
>
>0. define a SQL table named category:
>    create table category(categoryID int primary key,parentID int,name
>varchar(30))
>
>1. implement a Z SQL method named Category(parent):
>     select *
>     from Category where parentid=<dtml-var parentid>
>
>2. add the following DTML for example into index_html:
>
><dtml-let categoryID="0">
><dtml-tree branches_expr="Category(parentid=categoryID)">
><dtml-var name><br>
></dtml-tree>
></dtml-let>
>
>now the tree expands and collapses fine but I have to click thw branches 2
>to several times before they expand/collapse.
>so dear zopers what is the trick?

I can't believe that any of the older Zopistas on this list have not given 
a reference to the previous discussion on this subject, and its solution. 
Don't reinvent the wheel! Here is the complete discussion:

   http://www.zope.org/pipermail/zope/1999-June/thread.html#6127


--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-7502100 Fax: +31-35-7502111
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------