Re: [htmltmpl] Setting TMPL_VAR from HTML
Brought to you by:
samtregar
From: Peter S. <Peter@PSDT.com> - 2003-01-19 18:47:30
|
At 06:34 PM 1/19/03 +0000, Roger Burton West wrote: >On Sun, Jan 19, 2003 at 10:23:22AM -0800, Peter Scott wrote: > >Now, maybe I'm missing some more obvious way of doing it, and maybe > >I'll find it when I think a bit more about a workaround, but what I'd > >like to do right now is put something like > > <TMPL_VAR NAME="fred" VALUE="flintstone"> > >Here's a problem with that approach: maybe you don't want the value >displayed at the same point at which you set it? Doh! >I wrote an extension wrapper to HTML::Template which adds the <TMPL_SET> >command for this reason; the syntax is much like your version, but it >does not display the variable when it's being set. It's very basic but >gets the job done. Thanks, I'll check it out! Er... where is it? Doesn't appear to be listed under your CPAN id. >One particular benefit of either of these approaches is that you can >query the value of the variable, defined in the template, from the CGI >script that's doing it. -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ |