[Catalyst] Getting the result of the template processing
Robert 'phaylon' Sedlacek
rs at 474.at
Wed Jan 3 09:57:47 GMT 2007
Xavier Robin wrote:
> Hello all,
>
> How to get the result of the processing of a template ?
>
> I would like to do someting like that:
>
> $c->stash->{template} = 'display.tt2';
> my $result = $c->process_template;
> # put $result in database
>
> The processing of display.tt2 is quite long (a couple of seconds to go through
> nearly the whole database), so I would like to do it only once.
>
> I'm using a TTSite view. I don't want to get the complete page, only the HTML
> code generated by the template. What command should I use in place
> of "$c->process_template"? I couldn't find any plugin to do that, but not
> sure I looked deeply enough to find it, though...
Why not just use the ->render() method of View::TT?
--
# Robert 'phaylon' Sedlacek
# Perl 5/Catalyst Developer in Hamburg, Germany
{ EMail => ' rs at 474.at ', Web => ' http://474.at ' }
More information about the Catalyst
mailing list