Author: jlmonteiro
Date: Fri Dec 14 14:36:02 2012
New Revision: 1421896
URL: http://svn.apache.org/viewvc?rev=1421896&view=rev
Log:
Removing single narrative as we don't use it. Still time to add it again if
necessary
Modified:
openwebbeans/cms-site/trunk/lib/view.pm
Modified: openwebbeans/cms-site/trunk/lib/view.pm
URL:
http://svn.apache.org/viewvc/openwebbeans/cms-site/trunk/lib/view.pm?rev=1421896&r1=1421895&r2=1421896&view=diff
==============================================================================
--- openwebbeans/cms-site/trunk/lib/view.pm (original)
+++ openwebbeans/cms-site/trunk/lib/view.pm Fri Dec 14 14:36:02 2012
@@ -15,34 +15,6 @@ use ASF::Util qw/read_text_file/;
push @TEMPLATE_DIRS, "templates";
-# This is most widely used view. It takes a
-# 'template' argument and a 'path' argument.
-# Assuming the path ends in foo.mdtext, any files
-# like foo.page/bar.mdtext will be parsed and
-# passed to the template in the "bar" (hash)
-# variable.
-
-sub single_narrative {
- my %args = @_;
- my $file = "content$args{path}";
- my $template = $args{template};
- $args{path} =~ s/\.mdtext$/\.html/;
- $args{breadcrumbs} = breadcrumbs($args{path});
-
- read_text_file $file, \%args;
-
- my $page_path = $file;
- $page_path =~ s/\.[^.]+$/.page/;
- if (-d $page_path) {
- for my $f (grep -f, glob "$page_path/*.mdtext") {
- $f =~ m!/([^/]+)\.mdtext$! or die "Bad filename: $f\n";
- $args{$1} = {};
- read_text_file $f, $args{$1};
- }
- }
-
- return Template($template)->render(\%args), html => \%args;
-}
# Has the same behavior as the above for foo.page/bar.txt
# files, parsing them into a bar variable for the template.