19 Apr
2000
19 Apr
'00
1:29 p.m.
Tom Deprez wrote:
<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?
Tom, I think you need something like (untested) <dtml-if "_.len(objectValues(['MyClass']))>0"> <dtml-tree objectValues(['MyClass'])> </dtml-tree> </dtml-else> blablablablabla </dtml-if> Rik