[Zope] tree tag and SQLMethod

Ava ava@dde974.equipement.gouv.fr
Tue, 23 Nov 1999 14:33:06 +0400


Hello,

I come back from a long travel in outer space... :-)

I lost all my archives, and searching eegroup is a pain (still looking after
1 hour...)

I remember one of you explaining how to get SQL Method result from a tree
tag. At the time this clever guy did this, zope was not even 2.0.0alpha 1,
so he couldn't add a howto page to www.zope.org

Could someone explain how to do this.

I've got something like this:

   sql_get_children(parent):
SELECT key, parent, name FROM table WHERE <dtml-sqltest parent type=int>
<dtml-comment>The top-level is parent=0</dtml-comment>

   view_hierarchy:
<dtml-tree expr="sql_get_children(parent=0)"
branches_expr="sql_get_children(parent=parent)">
<dtml-var name>
</dtml-tree>

However, it does not work :-( It raise a NameError on 'parent', which I
guess it could get from the sql method result

any idea?

Regards,
Jephte CLAIN
minf7@educ.univ-reunion.fr

PS: please answer me directly since I'm not prepared yet to read 50+ message
a day being on the list :-)
If possible, send the message to minf7@educ.univ-reunion.fr instead of
ava@dde974.equipement.gouv.fr since that #@$ Exchange don't known what a
reply-to adresse is...