flyby has asked for the wisdom of the Perl Monks concerning the following question:
Hello. Long time reader first time poster.
I'm attempting to use HTML::Pager with HTML::Template. I've had good luck using HTML::Template in the past but I'm running into an issue using both together. When used together the column_names feature of HTML::Pager seems to get lost. This alone works:
my $pager = HTML::Pager->new( query => $query, column_names => \@headers, get_data_callback => $data, rows => $rows, page_size => 10, );
When used with HTML::Template the headers gets lost:
my $template = HTML::Template->new( filename => 'testing.tmpl', die_on_bad_params => 0, associate => $query, ); my $pager = HTML::Pager->new( query => $query, template => $template, column_names => \@headers, get_data_callback => $data, rows => $rows, page_size => 10, );
I suspect I need to include a TMPL_LOOP for the headers in my testing.tmpl file. The docs for HTML::Pager don't mention this and don't provide any clues as to what it might be.
If someone can point me in the right direction I'd appreciate it.
-Matt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: HTML::Template with HTML::Pager
by keszler (Priest) on Oct 09, 2013 at 18:27 UTC | |
by flyby (Acolyte) on Oct 09, 2013 at 18:59 UTC | |
by keszler (Priest) on Oct 09, 2013 at 19:39 UTC | |
by flyby (Acolyte) on Oct 09, 2013 at 20:46 UTC | |
by flyby (Acolyte) on Oct 09, 2013 at 22:20 UTC |