in reply to Forcing Variable Interpolation
A template with HTML::Template takes the following format:
Each TMPL_VAR entry is similar to $header, $footer, etc. You can then populate your template as easily as this:<html> <head> <title><TMPL_VAR NAME=TITLE></title> </head> <body bgcolor="#FFFFFF"> <TMPL_VAR NAME=BODYTEXT> </body> </html>
Cool, eh? ;)my $tmpl_frame = HTML::Template->new(filename => "/path/to/my/template.tmpl"); $tmpl_frame->param( TITLE => "Sample Page", BODYTEXT => "This is some text." ); print $tmpl_frame->output;
Hope this helps,
MrCromeDome
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Forcing Variable Interpolation
by fallenmonkey (Initiate) on May 09, 2002 at 18:45 UTC |