[Zope] SQL trees...

Mayers, Philip J p.mayers@ic.ac.uk
Mon, 21 Aug 2000 16:43:03 +0100


Excellent. That answers that.

I'm loath to ask this, since it's supposedly a FAQ, but I'm having trouble
with the tree...

Following:

http://www.zope.org/Members/anthony/tree-coding-tricks

I've got:

<dtml-let network="'0/0'">
<dtml-tree id=network branches_expr="network_children(parentnet=network)">
 <b><dtml-var network></b> <dtml-var descr>
</dtml-tree>
</dtml-let>

The SQL query is working - "test"ing network_children will give the correct
hierarchy. However, the tree generated looks like this:

192.168/16
  192.168/16
    192.168/16
    10/8
    172.20/16
  10/8
    192.168/16
    10/8
    172.20/16
  172.20/16
    192.168/16
    10/8
    172.20/16
10/8
  <etc>

Basically, the tree only seems to ever contain the top-level (children of
the root of the tree).  The children of all the nodes is... another copy of
the root top-level nodes! Whu?!? A search for several variations of "SQL
tree" in all the relevant list/site archives didn't seem to help. Any ideas?

Regards,
Phil

+----------------------------------+
| Phil Mayers, Network Support     |
| Centre for Computing Services    |
| Imperial College                 |
+----------------------------------+ 

-----Original Message-----
From: Chris Withers [mailto:chrisw@nipltd.com]
Sent: 21 August 2000 15:23
To: Mayers, Philip J
Cc: 'zope@zope.org'
Subject: Re: [Zope] dtml-let and quoting(?) or forcing to string


"Mayers, Philip J" wrote:
> <dtml-let network="0/0">
> <dtml-tree id=network branches_expr="network_children(parentnet=network)">
>  <b><dtml-var network></b> <dtml-var descr>
> </dtml-tree>
> </dtml-let>

Anything in a DTML tag that's inside "" is python, usually ;-)

So, your dtml-let should be:
<dtml-let network="'0/0'">

which is kinda yucky, don't you think?

cheers,

Chris

_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )