You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by pn...@apache.org on 2012/02/15 05:55:41 UTC

[Lucene.Net] svn commit: r1244358 - /incubator/lucene.net/site/trunk/lib/view.pm

Author: pnasser
Date: Wed Feb 15 04:55:41 2012
New Revision: 1244358

URL: http://svn.apache.org/viewvc?rev=1244358&view=rev
Log:
CMS commit to lucene.net by pnasser

Modified:
    incubator/lucene.net/site/trunk/lib/view.pm

Modified: incubator/lucene.net/site/trunk/lib/view.pm
URL: http://svn.apache.org/viewvc/incubator/lucene.net/site/trunk/lib/view.pm?rev=1244358&r1=1244357&r2=1244358&view=diff
==============================================================================
--- incubator/lucene.net/site/trunk/lib/view.pm (original)
+++ incubator/lucene.net/site/trunk/lib/view.pm Wed Feb 15 04:55:41 2012
@@ -40,28 +40,14 @@ use File::Basename;
 
 BEGIN { push @Dotiac::DTL::TEMPLATE_DIRS, "templates"; }
 
-# A "basic" view, which takes 'template' and 'path' parameters.
-
-sub basic {
-    my %args = @_;
-    my $filepath = "content$args{path}";
-    read_text_file($filepath, \%args);
-    $args{path} =~ s/\.mdtext$/\.html/;
-    $args{breadcrumbs} = _breadcrumbs($args{path});
-	my $template_path = "templates/$args{template}";
-    my $rendered = Dotiac::DTL->new($template_path)->render(\%args);
-    return ($rendered, 'html', \%args);
-}
-
-
 # news_page view (index.html)
 
-sub news_page {
+sub basic {
     my %args = @_;
     my $file = "content$args{path}";
     my $template = $args{template};
     $args{path} =~ s/\.mdtext$/\.html/;
-    $args{breadcrumbs} = breadcrumbs($args{path});
+    $args{breadcrumbs} = _breadcrumbs($args{path});
 
     read_text_file $file, \%args;
 
@@ -75,7 +61,7 @@ sub news_page {
         }
     }
 
-    return Dotiac::DTL->new($template)->render(\%args), html, \%args;
+    return Dotiac::DTL->new($template)->render(\%args), html => \%args;
 
 }