Files
netdisco/Netdisco/lib/Dancer/Template/NetdiscoTemplateToolkit.pm
Oliver Gorwits 6dbed02b7c properly search the template path!! [#103]
Conflicts:
	Netdisco/lib/App/Netdisco/Web.pm
	Netdisco/lib/App/Netdisco/Web/Plugin.pm
2014-07-01 21:05:31 +01:00

24 lines
491 B
Perl

package Dancer::Template::NetdiscoTemplateToolkit;
use strict;
use warnings;
use Dancer::FileUtils 'path';
use base 'Dancer::Template::TemplateToolkit';
sub view {
my ($self, $view) = @_;
foreach my $path (@{ $self->config->{INCLUDE_PATH} }) {
foreach my $template ($self->_template_name($view)) {
my $view_path = path($path, $template);
return $view_path if -f $view_path;
}
}
# No matching view path was found
return;
}
1;