X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=trunk%2Flib%2FCatalyst%2FView%2FTT.pm;h=2d19a470e709a4a443974abdacfb26174b439cfd;hb=0deea661d435742e001df024796ef6e4a861a2c6;hp=dd5710ed307468b5be3871d933670dcf93f192b6;hpb=f76c361a91a34cbbe601f4c2473673cc3531705a;p=catagits%2FCatalyst-View-TT.git diff --git a/trunk/lib/Catalyst/View/TT.pm b/trunk/lib/Catalyst/View/TT.pm index dd5710e..2d19a47 100644 --- a/trunk/lib/Catalyst/View/TT.pm +++ b/trunk/lib/Catalyst/View/TT.pm @@ -478,13 +478,18 @@ See L> property of the L method. The constructor for the TT view. Sets up the template provider, and reads the application config. -=head2 process +=head2 process($c) Renders the template specified in C<< $c->stash->{template} >> or C<< $c->action >> (the private name of the matched action). Calls L to perform actual rendering. Output is stored in C<< $c->response->body >>. -FIXME: NOTE forward here +It is possible to forward to the process method of a TT view from inside +Catalyst like this: + + $c->forward('View::TT'); + +N.B. This is usually done automatically by L. =head2 render($c, $template, \%args) @@ -506,7 +511,10 @@ See L for a full list of supported formats. To use the render method outside of your Catalyst app, just pass a undef context. This can be useful for tests, for instance. -FIXME: NOTE forward here +It is possible to forward to the render method of a TT view from inside Catalyst +to render page fragments like this: + + my $fragment = $c->forward("View::TT", "render", $template_name, $c->stash->{fragment_data}); =head2 template_vars