[Catalyst] Getting the result of the template processing

Xavier Robin robin0 at etu.unige.ch
Wed Jan 3 09:45:35 GMT 2007


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...

Thank you,
Xavier



More information about the Catalyst mailing list