You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2010/11/29 00:58:19 UTC

[lucy-commits] svn commit: r1039984 - /incubator/lucy/site/trunk/lib/view.pm

Author: marvin
Date: Sun Nov 28 23:58:19 2010
New Revision: 1039984

URL: http://svn.apache.org/viewvc?rev=1039984&view=rev
Log:
Fix some filepath issues so that Dotiac::DTL constructor can find our template
files.

Modified:
    incubator/lucy/site/trunk/lib/view.pm

Modified: incubator/lucy/site/trunk/lib/view.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/site/trunk/lib/view.pm?rev=1039984&r1=1039983&r2=1039984&view=diff
==============================================================================
--- incubator/lucy/site/trunk/lib/view.pm (original)
+++ incubator/lucy/site/trunk/lib/view.pm Sun Nov 28 23:58:19 2010
@@ -41,12 +41,12 @@ BEGIN { push @Dotiac::DTL::TEMPLATE_DIRS
 
 sub basic {
     my %args = @_;
-    my $filepath = "content$args{path}";
-    my $template = $args{template};
+    my $filepath      = "content$args{path}";
+    my $template_path = "templates/$args{template}";
     $args{path} =~ s/\.mdtext$/\.html/;
     $args{breadcrumbs} = _breadcrumbs($args{path});
     $args{content}     = _slurp_file($filepath);
-    my $rendered = Dotiac::DTL->new($template)->render(\%args);
+    my $rendered = Dotiac::DTL->new($template_path)->render(\%args);
     return ($rendered, 'html', \%args);
 }