[Zope-dev] tree tag _extraordinary_ namespace ugliness.
Benno Rice
benno@netizen.com.au
Fri, 21 Jan 2000 13:27:02 +1100
(Sorry about sending this multiple times. I goofed.)
On Wed, Jan 19, 2000 at 01:41:14PM +1100, Anthony Baxter wrote:
> Ok, this is making my brain hurt.
>
> Say I have something like the following:
>
> <dtml-let id="top">
> <dtml-tree id=id branches_expr="somefunc(parent_id=id)">
> foo foo foo.
> </dtml-tree>
> </dtml-let>
[snip of the rest of problem desc and tentative fix.]
Works for me. I was trying to to a <dtml-tree> within a <dtml-in> and
was seeing pretty much the same namespace weirdness. All fixed by applying
the following diff to lib/python/TreeDisplay/TreeTag.py in Zope 2.1.2 on
FreeBSD/i386 4.0-CURRENT.
*** TreeTag.py.old Fri Jan 21 13:22:48 2000
--- TreeTag.py Fri Jan 21 13:22:57 2000
***************
*** 238,249 ****
'tree-colspan': colspan,
'tree-state': state }
- md._push(InstanceDict(self, md))
md._push(treeData)
try: tpRenderTABLE(self,id,root,url,state,substate,diff,data,colspan,
section,md,treeData, level, args)
! finally: md._pop(2)
if state is substate and not (args.has_key('single') and args['single']):
state=state or ([id],)
--- 238,248 ----
'tree-colspan': colspan,
'tree-state': state }
md._push(treeData)
try: tpRenderTABLE(self,id,root,url,state,substate,diff,data,colspan,
section,md,treeData, level, args)
! finally: md._pop(1)
if state is substate and not (args.has_key('single') and args['single']):
state=state or ([id],)
--
Benno Rice "No, no. We're *sweet* and
XNFP Aries Dark Subculture- *innocent* evil bastards."
friendly Internet Geek
benno@netizen.com.au "Defend your joy"