[Zope] Rules on passing variables from dmtl-python-dtml
Passin,Thomas B. (Tom)
tpassin@mitretek.org
Wed, 11 Sep 2002 09:03:06 -0400
[ McDonnell, Larry]
> # Example code:
>=20
> # Import a standard function, and get the HTML request and=20
> response objects.
> from Products.PythonScripts.standard import html_quote
> request =3D container.REQUEST
> RESPONSE =3D request.RESPONSE
>=20
> y=3D'0'+str(x)
>=20
> return y
>=20
> But I'm lost on the passing.
>=20
> <dtml-call "int_to_string(num)">
>=20
> **<dtml-var y>**
>=20
What is wrong with=20
<dtml-var "int_to_string(num)">
to get the same result?
If you really need to pass a variable around, use dtml-let:
<dtml-let y=3D"int_to_string(num)">
<dtml-do-something y>
<dtml-do-something-else y>
</dtml-let>
Cheers,
Tom P