[Zope] DTML and Lists

Leonardo Mota leo@airsystem.com.br
Wed, 21 Feb 2001 16:22:20 -0300


Hello,
    I'd pretty much a newbie at Zope and running into some problems. I
have to make a <dtml-tree> with it's branches being fetched from a
database, that's already done but I also need to carry a variable with
the whole hierarchy to the last leaf of the tree. Something like (time
for nasty ascii art):

    +- Software 0
    |  +- Operational System 0.1
    |     +- Linux   0.1.1
    |     +- FreeBSD 0.1.2
    +- Hardware 3

   Those numbers are indexes on the database, when someone clicks on
"Linux" I want to query the database for items that are related to
Software/OS/Linux. I understand that I could use Zope's own file system
facilities but I'm afraid if this solution is scaleable to, maybe,
thousands of categories(folders).
    Reading <dtml-tree>'s docs I've found a list that carries what I
want, "tree-state", but I have no idea on how to access list's members
on DTML. I've tried <dtml-var tree-state[0]> with no success.
    Any suggestions or solutions?

Thanks in advance
Leo