On Tue, Jul 30, 2002 at 02:23:51PM +0100, Dave Hodgkinson wrote:
>
> params.my_thingy is only returning one value, probably as per the CGI
> docs which requires:
>
> @turned_on = $query->param('group_name');
>
> Since I'm going to be using a Plugin to handle this, can I reference
> the CGI object from my plugin? I tried finding it in the stash...
Quick and dirty hack around Apache::Request, to turn it into a
plugin :
use strict;
use Template::Plugin qw( );
use base qw( Template::Plugin Apache::Request);
sub new {
my $class = shift;
my $context = shift;
return bless Apache::Request->instance(Apache->request), $class;
}
"tada";
then in the template :
<? USE apr = APR ?>
<? apr.param('group_name') ?>
It works, but I guess it's quite dirty... any suggestion is welcome :)
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://www.template-toolkit.org/mailman/listinfo/templates