in reply to Can you include templates in Template Toolkit without specifying the file extension?
Hi,
See https://metacpan.org/pod/Template#LOAD_TEMPLATES and https://metacpan.org/pod/Template::Provider#SUBCLASSING
and make a provider, something like this untested one
package Template::Provider::ImplicitExtension; use parent qw/ Template::Provider /; sub _template_modified { my ($self, $path) = @_; return $self->SUPER::_template_modified( $path.'.tt2'); } sub _template_content { my ($self, $path) = @_; return $self->SUPER::_template_content( $path.'.tt2'); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Can you include templates in Template Toolkit without specifying the file extension?
by TrixieTang (Sexton) on May 17, 2017 at 17:59 UTC | |
by Corion (Patriarch) on May 17, 2017 at 18:08 UTC | |
by Anonymous Monk on May 17, 2017 at 18:34 UTC | |
by Corion (Patriarch) on May 17, 2017 at 18:37 UTC |