Note using forward to call the view both process and render methods
Tomas Doran [Sun, 4 Oct 2009 00:06:59 +0000 (00:06 +0000)]
lib/Catalyst/View/TT.pm

index dd5710e..2d19a47 100644 (file)
@@ -478,13 +478,18 @@ See L<C<TIMER>> property of the L<config> 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<render> 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<Catalyst::Action::RenderView>.
 
 =head2 render($c, $template, \%args)
 
@@ -506,7 +511,10 @@ See L<Template::process|Template/process> 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