Re: [htmltmpl] TMPL_VAR inside a TMPL_VAR
Brought to you by:
samtregar
From: Ron M. <rma...@in...> - 2004-01-13 17:08:11
|
On Tue, Jan 13, 2004 at 05:56:11AM -0800, LDT wrote: > Thanks for the reply, Ron. ... > I had tried to add the $cell_fmt to my @loop_data (which is fed into the TMPL_LOOP on the main template), but it didn't like that either (undoubtedly it was the way I was trying to add it). I am curious about this piece of your code: filehandle => \*DATA. What does this do? The parts I understand are that you're setting up file handle, the "\" is a reference, and the "DATA" is referenced to the section below. My guess would be that this is how you're passing the formatting stuff to the template. Is that right? A perl script can have a "data" section, anything that follows the __DATA__ tag in the script file. The part with \*DATA is a reference filehandle to that data section. Its a nifty little trick that I use to test out templates in the same file as a script. I'm glad you found a solution to your problem. Ron. |