Re: [htmltmpl] Usage question
Brought to you by:
samtregar
From: Mark A. F. <mar...@ea...> - 2006-03-06 03:11:51
|
From: Matias Alejo Garcia <ma...@ni...> > >Is there any way to, once the $template is filled, to dump the variables to >a file? I may not understand this correctly. But, you can print your $template->output() to a file (instead of STDOUT). Give essentially static HTML to the designer. She'd have to open each one individually. You just "print FH $template->output()". If you want to do some preprocessing like change the CSS link to a disk file instead of an HTTP link you can do something like "my $html = $template->output()" and do a "$html =~ s/<whatever>/<something>/". Then print the $html variable to a file. If you want to give the designer the actual templates (but not require her to install the entire application), you could write a little script that would load each template, set variables and ->output() it to a file. Something like a script to run through some test cases (generate the page with the user logged in, not logged in, with an error message, with a success message, with the "you have mail" indicator set, etc.). This way the designer could change the template and regenerate some HTML (without actually using the entire application). Mark |