<dtml-tree> from within a product
I have the following code in a product dtml_method index_html <dtml-var standard_html_header> <dtml-let url="REQUEST.PARENTS[1]"> <dtml-in "display(param=url)"> <dtml-var "getId()"> </dtml-in> <dtml-tree branches="display(param=url)"> <dtml-var "getId()"> </dtml-tree> </dtml-let> <dtml-var standard_html_footer> python script return (param.objectValues('Image')) output is fine for the upper <dtml-in> loop but NO TREE WHY
chrisf writes:
dtml_method index_html .... <dtml-tree branches="display(param=url)"> <dtml-var "getId()"> </dtml-tree> ... python script
return (param.objectValues('Image')) Two serious problems:
1. "branches" expects a method name not an expression. Use "branches_expr" when you want an expression 2. It is not very wise to generate a tree with a branches expression that is independent of its context. You will get an infinite (lazy) tree where each node has the same children. Dieter
participants (2)
-
chrisf -
Dieter Maurer