From: Sven Schöling Date: Thu, 11 Apr 2013 10:51:40 +0000 (+0200) Subject: config tag-style für TT vorlagen X-Git-Tag: release-3.1.0beta1~467 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=29185b688ec990bdb801cd8736a12c403095db0c;p=kivitendo-erp.git config tag-style für TT vorlagen --- diff --git a/SL/Template/LaTeX.pm b/SL/Template/LaTeX.pm index 5d5008c1f..02ad31761 100644 --- a/SL/Template/LaTeX.pm +++ b/SL/Template/LaTeX.pm @@ -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); diff --git a/SL/Template/Simple.pm b/SL/Template/Simple.pm index b1f155bf5..be5ba8b5d 100644 --- a/SL/Template/Simple.pm +++ b/SL/Template/Simple.pm @@ -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;