[Catalyst] sending a variable to more than one tt2 template
Eden Cardim
edencardim at gmail.com
Fri Mar 7 00:23:14 GMT 2008
On Thu, Mar 6, 2008 at 7:36 PM, Emily Heureux <emily at burnham.org> wrote:
> Hi, I have a variable in a Controller method sent to the stash for a
> particular tt file. What if I want that same variable to be available to
> another tt file? I assume I cannot set two templates in one method.
yeah you can:
my $vars = { foo => 'bar' };
my $output1 = $c->view('TT')->render($c, 'template1.tt', $vars);
my $output2 = $c->view('TT')->render($c, 'template2.tt', $vars);
--
edenc.vox.com
More information about the Catalyst
mailing list