I'm using Template Toolkit for the first time and I would really appreciate
some help with the following question:
I'm sending the request object in the handler, like this:
my $r = shift;
my $request = Apache2::Request->new($r);
my %vars = (request => $request,...);
$TT->process($file_path, \%vars, $r) || return error($r,$TT->error( ))
And then, in the template, I do the following to access the request object:
[%RAWPERL%]my $request = $stash->get('request');[%END%]
I know it's working because I can get the parameters from the request object
by doing this:
[%RAWPERL%]
my $request = $stash->get('request');
my $param1 = $request->param('param1');
$output .= $param1;
[%END%]
But I'm not sure if I'm doing this the right way.
I really would appreciate any help.
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates