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 &#8216;$&#8217; &#43; &#8216;spform[spdata].sp&#821=
7; &#43; str( $i )</div>
<div>&lt;input type=3D&#8221;text&#8221; name=3D&#8221;testfield&#8221; val=
ue=3D&#8221;$fldvalue&#8221;/&gt;</div>
<div>#end for</div>
<div>&nbsp;</div>
<div>In the code above, the input value $fldvalue will display $spform[spda=
ta].sp0 and not the actual value from spform dictionary.&nbsp; 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.&nbsp; It continues to display as a string and I canno=
t figure out how to display the value from dictionary.&nbsp; How can I acco=
mplish this?&nbsp; I hope this makes sense. Thanks, Olivia</div>
<div><font face=3D"Calibri, sans-serif" size=3D"2">&nbsp;</font></div>
<div><font face=3D"Calibri, sans-serif" size=3D"2">&nbsp;</font></div>
<div><font face=3D"Calibri, sans-serif" size=3D"2">&nbsp;</font></div>
<div><font face=3D"Calibri, sans-serif" size=3D"2">&nbsp;</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==--