[Zope] parameters from dtml to python
tom smith
tom@othermedia.com
Tue, 19 Nov 2002 09:06:59 +0000
--Apple-Mail-53--739922249
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=ISO-8859-1;
format=flowed
On Monday, November 18, 2002, at 01:35 PM, Jorg E. R=F8dsj=F8 wrote:
> <dtml-in expr=3D"makePhoneList(searchString=3D'foo', '<dtml-var =
sortBy1>',=20
> '<dtml-var sortBy2>')">
..the above can't work because you can't have DTML within DTML.
You need to get the difference between DTML-space and python-space.=20
They are kind of separate but can be made to know about each other=20
quite easily like this...
<!-- this lets python know about the variables -->
<dtml-let s1=3DsortBy1 s2=3DsortBy2> =09=
<!-- note I've named the params (seems to help) -->
<dtml-in "makePhoneList(searchString=3DsearchString, sortBy1=3Ds1,=
=20
sortBy2=3Ds2 )"> <dtml-var firstName><br/>
</dtml-in>
</dtml-let>
cheers
tom
--
tom smith
http://www.othermedia.com/blog/
0207 089 5959
3rd Floor, The Pavilion, Newham's Row, London SE1 3UZ
--Apple-Mail-53--739922249
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
charset=ISO-8859-1
On Monday, November 18, 2002, at 01:35 PM, Jorg E. R=F8dsj=F8 wrote:
<excerpt><<dtml-in expr=3D"makePhoneList(searchString=3D'foo', =
'<<dtml-var
sortBy1>', '<<dtml-var sortBy2>')">
</excerpt><fontfamily><param>Helvetica</param>
..the above can't work because you can't have DTML within DTML.
You need to get the difference between DTML-space and python-space.
They are kind of separate but can be made to know about each other
quite easily like this...
<<!-- this lets python know about the variables -->
<<dtml-let s1=3DsortBy1 s2=3DsortBy2> =09=
<<!-- note I've named the params (seems to help) -->
<<dtml-in "makePhoneList(searchString=3DsearchString, =
sortBy1=3Ds1,
sortBy2=3Ds2 )"> <<dtml-var firstName><<br/>
</fontfamily> <</dtml-in><fontfamily><param>Helvetica</param>
<</dtml-let>
cheers
tom
--
tom smith
http://www.othermedia.com/blog/
0207 089 5959
3rd Floor, The Pavilion, Newham's Row, London SE1 3UZ</fontfamily>
--Apple-Mail-53--739922249--