Thank you very much for your answer. However, I really do need to do this from within a RAWPERL block...the way I'm doing is ok or is there any other way? Please help.
On Tue, Dec 15, 2009 at 10:54 AM, Ronald J Kimball < [email protected] <rkimball%[email protected]>> wrote: > 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
