[Zope] tree tag and SQLMethod (again)

Ava ava@dde974.equipement.gouv.fr
Thu, 25 Nov 1999 17:16:16 +0400


Hello,

Please forgive me. This is the second time I post this message.
But I'm sure one among you build trees from sqlmethod queries...
Please note also that I'm not currently on the list.
It would be glad if you could forward your answer to
minf7@educ.univ-reunion.fr as well

Also, I made some enhancements to the Mime tag. I will post it as soon as
possible.

here follows the original message
----------------------8<---------------------------
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?

--------------------------8<---------------------------------

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