[Zope] dtml-tree stuff
Stuart Foster
stuart@opnix.com
Thu, 30 Nov 2000 09:27:52 GMT
I have a similar need and have found the How-To's cryptic also. I too get
company1 over and over.
Original Message dated 11/30/00, 3:12:00 PM
Author: Mike Kelland <mike@studiomatic.com>
Re: [Zope] dtml-tree stuff:
I think I may not have asked a specific enough question last time round.
I'll try it again. I've been looking through the How-To's and the
documentation and the dtml-tree stuff that I have found seems exceedingly
cryptic. The closest that I've come to a solution is the following code:
<dtml-in "getAllClientNames(REQUEST)">
<dtml-tree id=clientID
branches_expr="getClientsForProjects(get_clientID=clientID)" >
<dtml-var company_name>
</dtml-tree>
</dtml-in>
where
getAllClientNames looks like:
select company_name,clientID from client;
and getClientsForProjects looks like:
select company_name, clientID from client where deleted = 0 and clientID
= <dtml-sqlvar get_clientID type=int>;
This gives me a tree structure which, when I expand company1 gives me
company1 again and again
(ie
Company1
Company1
Company1
Company1
etc as deep as I care to go
Company2
Company2
etc
Company3
Company4
What I'm trying to do is list my company name as the tree branch and have
the sub headings of each branch be my projects for that company. Can
anyone help?
Thanks very much
Mike Kelland
mike@studiomatic.com