[Zope] dtml-in variables not available to called methods?
Michel Pelletier
michel@digicool.com
Tue, 21 Mar 2000 05:33:49 -0800
Chris Withers wrote:
>
> > Scope. if you also did:-
> >
> > <dtml-call "REQUEST.set('cid',cid)">
> >
> > It would work too. The dtml-in variables are not available to sub-methods,
> > this surprised me at first too, but, you get used to it :-)
>
> If this is true, it's really counterintuitive and should be changed if at all possible.
This is not true.
Method A:
<dtml-with "_(bob='uncle')">
<dtml-var B>
</dtml-with>
Method B:
<dtml-var bob>
_will_ print 'uncle'.
> If it's specific to ZSQL methods or in otherwise confusing situations, then there's even more reason
> to change it...
It is specific to ZSQL Methods, they create their own fresh namespace.
There may be a good reason, I can't think of one.
-Michel