From: subs <su...@sn...> - 2004-07-13 20:53:08
|
Russell, sub mypage { my $model = shift; my (@param_names) = $model->pkit_query(); ... } Have a look at pkit_query in Apache::PageKit::Model, and in http://search.cpan.org/~samtregar/HTML-Template-2.6/Template.pm "Just like param(), query() with no arguements returns all the parameter names in the template at the top level." Ben > Hey all, > > I know that PageKit is based upon HTML::Template. > HTML::Template allows you retrieve a list of all TMPL_VAR > (and TMPL_IF/UNLESS) elements as shown in the documentation: > > ----------------------------------------------------------- > 1) To return a list of parameters in the template : > my @parameter_names = $self->param(); > ----------------------------------------------------------- > > This works well. Is there any way to retrieve the element > list under PageKit? If not, I assume it wouldn't be too hard > to add in. I just wanted to see if a method like this > existed (been using PageKit for quite a while and haven't > seen it in the docs). > > Thanks, > Russell |