[Zope] DTML-TREE
Tom Deprez
tom.deprez@uz.kuleuven.ac.be
Wed, 19 Apr 2000 15:21:31 +0200
><dtml-if myobject>
> <dtml-tree myobject>
> ...
> </dtml-tree>
><dtml-else>
> ...put your else stuff here...
></dtml-if>
I don't define myobject. My tree searches certain classes. :
<dtml-tree branches_expr="objectValues['MyClass']">
</dtml-tree>
This code is defined in the index_html of a container class.
So in order to use the 'if' statement, I would need a way to say : 'if a
class exists of this type then, otherwise do..'. How can I handle this?
>> ie. How do you know if DTML-TREE has no objects fullfilling to the
>> braches_expr and thus returns no tree?
>
>the branches_expr is used to find branches. If the object you supply to
the tree tag has no objects
>fulfilling the brancehs_expr then you'll just get a tree with one root node.
>
>> Is there a way to change the look of a tree?
>
>check out:
>
>http://classic.zope.org:8080/Collector/374/view
>http://classic.zope.org:8080/Collector/375/view
>
>They may be of some help but I'm not sure exactly what they do :S
>
>Chris
>