[Zope] [2nd try] dtml-tree causing authorization errors
Hannu Krosing
hannu@tm.ee
Tue, 23 Jan 2001 08:54:48 +0200
yves@njc.ch wrote:
>
> [ I accidentally sent the last mail before I completed it... Sorry ]
>
> I've stumbled upon a strange problem with dtml-tree in version 2.2.5 (the
> problems occurs in the same way in any of the 2.2.x version), but didn't exhibit
> itself in 2.1.6:
>
> Here's some (very) crude code to generate a tree object:
>
> -------------
> class Tree:
> def __init__(self, val='top'):
> self.name = val
> self.tpId = val
>
> def tpValues(self):
> tlist = []
>
> for i in range(8):
> tlist.append(Tree('me: %s' % i))
>
> return tlist
>
> def build():
> return Tree()
> --------------
>
> Now if I attach this to an "External Method" called "mytree" which references
> the function "build()", and I write the following DTML:
>
> -----
> <dtml-tree mytree>
> <dtml-var name>
> </dtml-tree>
> -----
Have you tried:
<dtml-tree mytree>
<dtml-var "_.['name']">
</dtml-tree>
------------
Hannu