QaR QaR wrote:

> 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%]

You don't need to use RAWPERL for this.  You can just access the request 
TT variable with normal TT syntax.  This will render the value of param1 
in the output:

[% request.param('param1') %]

Ronald

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to