[Catalyst] Re: OT: Better TT pager?

Peter Karman peter at peknet.com
Fri Jan 23 19:45:32 GMT 2009

Oliver Charles wrote on 01/23/2009 01:31 PM:
> On 23 Jan 2009, at 15:00, Jesse Sheidlower wrote:
>> I like this quite a bit, more than some of the other solutions
>> which I tried, and think I'll use this.
> Glad you like it :)
>> One question, from an arithmetically-challenged one: How would
>> I modify this to allow the user to skip by, say, tens? If you
>> have a search with 1000 pages, you can only go to the
>> beginning or end, but getting to the middle would be
>> unbearably tedious (it would be only slight less tedious
>> having to do it be tens, but still better).
> Well, it really depends on how you want to display the results. But I
> guess you'd do some kind of loop, doing (i * 10) to get the multiples of
> 10 - the just looping until you exceed total_pages. However, this is
> really getting a bit more complex than should be in a template
> (arguably, even my template is too complex) - so you should look to
> maybe subclass Data::Page to do this for you.

Data::Pageset or even Data::Pageset::Render

I use Data::Pageset in all my apps. See e.g. SWISH::WebService, which
includes TT snippets implementing XML and HTML pagers.

Peter Karman  .  peter at peknet.com  .  http://peknet.com/

More information about the Catalyst mailing list