provide session to template toolkit plugins
This commit is contained in:
parent
458b1a1b0b
commit
0df9fb747a
1 changed files with 5 additions and 1 deletions
|
|
@ -81,7 +81,11 @@ sub process {
|
|||
POST_CHOMP => 1, # cleanup whitespace
|
||||
EVAL_PERL => 0, # evaluate Perl code blocks
|
||||
});
|
||||
unless ($t->process( \$template, _rewriteVars($vars),\$output)) {
|
||||
$vars = _rewriteVars($vars);
|
||||
# store the session so plugins can access it.
|
||||
# underscore prefix prevents direct access from templates
|
||||
$vars->{_session} = $self->session;
|
||||
unless ($t->process( \$template, $vars,\$output)) {
|
||||
my $e = $t->error;
|
||||
$self->session->log->error($e);
|
||||
die $e;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue