[Zope] scope of DTML-let tag
Tres Seaver
tseaver@palladion.com
Fri, 31 Mar 2000 16:18:02 -0600
Allen Wallis <allen@rrsg.ee.uct.ac.za> wrote:
>
> Hi,
> Say I want to call a dtml method that requires some extra variable, one
> way is to set that variable in the REQUEST using REQUEST.set('name',
> 'value'), and one is able to call the dtml method.
> Somebody suggested using the DTML-let tag to do the same thing, but I
> haven't been able to get it to work:
>
> <dtml-let variable="some expresion">
> <dtml-var dtmlmethodname>
> </dtml-let>
>
> when dtmlmethodname tries to access "variable" with <dtml-var variable>,
> zope complains that variable does not exist. Is there a way of using the
> let tag to accomplish this, or is there a different way?
> Is using the REQUEST object the normal way of "passing" variables to
> other methods ?
Hmm, here is what I have, in DTML Method aaabbbccc::
<dtml-var standard_html_header>
<p> Calling asdf with variable 'foo' = 'bar', using the let tag: </p>
<dtml-let foo="'bar'">
<dtml-var asdf>
</dtml-let>
<dtml-var standard_html_footer>
And in DTML Method asdf::
<p> <dtml-var foo></p>
When I view aaabbbccc, I see::
Calling asdf with variable 'foo' = 'bar', using the let tag:
bar
which is exactly what I expected.
Can you see any differences between your code and mine?
Tres.
--
=========================================================
Tres Seaver tseaver@digicool.com tseaver@palladion.com