1 package Maypole::View::TT;
2 use base 'Maypole::View::Base';
3 use Maypole::Constants;
8 my $template = Template->new({ INCLUDE_PATH => [ $self->paths($r) ]});
10 if ($template->process($r->template, { $self->vars($r) }, \$output)) {
11 $r->{output} = $output;
14 $r->{error} = $template->error;
23 Maypole::View::TT - A Template Toolkit view class for Maypole
27 BeerDB->config->{view} = "Maypole::View::TT"; # The default anyway
31 This is the default view class for Maypole; it uses the Template Toolkit
32 to fill in templates with the objects produced by Maypole's model classes.
33 Please see the Maypole manual, and in particular, the C<View> chapter,
34 for the template variables available and for a refresher on how template
35 components are resolved.