You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jo...@apache.org on 2014/03/20 16:35:49 UTC

svn commit: r1579667 - /thrift/cms-site/trunk/lib/view.pm

Author: joes
Date: Thu Mar 20 15:35:49 2014
New Revision: 1579667

URL: http://svn.apache.org/r1579667
Log:
expose snippet templates to django headers

Modified:
    thrift/cms-site/trunk/lib/view.pm

Modified: thrift/cms-site/trunk/lib/view.pm
URL: http://svn.apache.org/viewvc/thrift/cms-site/trunk/lib/view.pm?rev=1579667&r1=1579666&r2=1579667&view=diff
==============================================================================
--- thrift/cms-site/trunk/lib/view.pm (original)
+++ thrift/cms-site/trunk/lib/view.pm Thu Mar 20 15:35:49 2014
@@ -10,8 +10,6 @@ sub thrift_preprocessor {
     my %args = @_;
     my $file = "content$args{path}";
     read_text_file $file, \%args;
-    delete $args{header};
-    delete $args{view};
 
     my $key = "_snippet_a";
     $args{content} =~ s{\[snippet:([^\]]+)\]}
@@ -27,6 +25,8 @@ sub thrift_preprocessor {
                            "{{ " . $key++ . ".fetch|markdown }}";
                        }ge;
 
+    delete $args{header};
+    delete $args{view};
     return view->can("single_narrative")->(%args);
 }