X-Git-Url: https://git.decadent.org.uk/gitweb/?p=maypole.git;a=blobdiff_plain;f=lib%2FMaypole%2FView%2FTT.pm;h=13130e53ec1154c6ecfe1c44019db12582265096;hp=59c3f8fe888388b26dbf969e14fadd6288c43ec6;hb=5ca6a1765a44c39b23e7bab0e2ba636dbc6b57a8;hpb=8fbe91d3208f182f78e2cd316f2c0c7a5c76edb8 diff --git a/lib/Maypole/View/TT.pm b/lib/Maypole/View/TT.pm index 59c3f8f..13130e5 100644 --- a/lib/Maypole/View/TT.pm +++ b/lib/Maypole/View/TT.pm @@ -21,8 +21,12 @@ sub template { $self->{provider}->include_path([ $self->paths($r) ]); + my $template_file = $r->template; + my $ext = $r->config->template_extension; + $template_file .= $ext if defined $ext; + my $output; - if ($self->{tt}->process( $r->template, { $self->vars($r) }, \$output )) { + if ($self->{tt}->process($template_file, { $self->vars($r) }, \$output )) { $r->{output} = $output; return OK; }