config tag-style für TT vorlagen
authorSven Schöling <s.schoeling@linet-services.de>
Thu, 11 Apr 2013 10:51:40 +0000 (12:51 +0200)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 25 Apr 2013 12:38:15 +0000 (14:38 +0200)
SL/Template/LaTeX.pm
SL/Template/Simple.pm

index 5d5008c..02ad317 100644 (file)
@@ -356,6 +356,10 @@ sub parse {
   if ($self->{use_template_toolkit}) {
     my $additional_params = $::form;
 
+    if ($self->{custom_tag_style}) {
+      $contents = "[% TAGS $self->{tag_start} $self->{tag_end} %]\n" . $contents;
+    }
+
     $::form->init_template->process(\$contents, $additional_params, \$new_contents) || die $::form->template->error;
   } else {
     $new_contents = $self->parse_block($contents);
index b1f155b..be5ba8b 100644 (file)
@@ -48,6 +48,7 @@ sub set_tag_style {
   my $tag_start               = shift;
   my $tag_end                 = shift;
 
+  $self->{custom_tag_style}   = 1;
   $self->{tag_start}          = $tag_start;
   $self->{tag_end}            = $tag_end;
   $self->{tag_start_qm}       = quotemeta $tag_start;