variables in template
"Redhorse, Olivia J. (WSTF-RD)[Jacobs Technology Inc]" <[email protected]> Fri, 12 Jul 2013 10:32:10 -0500
| Newsgroups | gmane.comp.python.cheetah |
|---|---|
| Message-ID | <E52EA05C92E2CB4EBCA4A79448135A72D1D49B1985@NDJSSCC05.ndc.nasa.gov> |
--===============8472135298458759833==
Content-Language: en-US
Content-Type: multipart/alternative;
boundary="_000_E52EA05C92E2CB4EBCA4A79448135A72D1D49B1985NDJSSCC05ndcn_"
--_000_E52EA05C92E2CB4EBCA4A79448135A72D1D49B1985NDJSSCC05ndcn_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
#for $i in $hdrcol:
#set $fldvalue =3D '$' + 'spform[spdata].sp' + str( $i )
<input type=3D"text" name=3D"testfield" value=3D"$fldvalue"/>
#end for
In the code above, the input value $fldvalue will display $spform[spdata].s=
p0 and not the actual value from spform dictionary. I am trying to create =
an incrementing value such as; sp1, sp2, sp3,..etc in $fldvalue to retrieve=
that values from the dictionary into the input field. It continues to dis=
play as a string and I cannot figure out how to display the value from dict=
ionary. How can I accomplish this? I hope this makes sense. Thanks, Olivi=
a
--_000_E52EA05C92E2CB4EBCA4A79448135A72D1D49B1985NDJSSCC05ndcn_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left:=
#800000 2px solid; } --></style>
</head>
<body>
<font face=3D"Comic Sans MS, cursive" size=3D"2">
<div>#for $i in $hdrcol:</div>
<div>#set $fldvalue =3D ‘$’ + ‘spform[spdata].sp̵=
7; + str( $i )</div>
<div><input type=3D”text” name=3D”testfield” val=
ue=3D”$fldvalue”/></div>
<div>#end for</div>
<div> </div>
<div>In the code above, the input value $fldvalue will display $spform[spda=
ta].sp0 and not the actual value from spform dictionary. I am trying =
to create an incrementing value such as; sp1, sp2, sp3,..etc in $fldvalue t=
o retrieve that values from the dictionary
into the input field. It continues to display as a string and I canno=
t figure out how to display the value from dictionary. How can I acco=
mplish this? I hope this makes sense. Thanks, Olivia</div>
<div><font face=3D"Calibri, sans-serif" size=3D"2"> </font></div>
<div><font face=3D"Calibri, sans-serif" size=3D"2"> </font></div>
<div><font face=3D"Calibri, sans-serif" size=3D"2"> </font></div>
<div><font face=3D"Calibri, sans-serif" size=3D"2"> </font></div>
</font>
</body>
</html>
--_000_E52EA05C92E2CB4EBCA4A79448135A72D1D49B1985NDJSSCC05ndcn_--
--===============8472135298458759833==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
--===============8472135298458759833==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Cheetahtemplate-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
--===============8472135298458759833==--