[Catalyst] DBIx::Class/TT Pager Question

Dennis Daupert ddaupert at sbcglobal.net
Tue Jan 2 19:02:58 GMT 2007


On Mon, 1 Jan 2007 16:15:00 Kay Sindre Bærulfsen wrote:
>What I do;

>Controller;
>$c->stash->{'images'} = $c->model('DB::Image')->search({
>    deleted => { LIKE => '0000-00-00 00:00:00' },
>    gallery_id => $gallery->id,
>},{
>    rows => 6,
>})->page($page);
>
>View(TT);
>
>[%- WHILE (i=images.next) %]
><img src="http://galleri.my-domain.nu/data/240x180/[%
>i.filename.split('').first %]/[% i.filename FILTER upper %]?[%
>i.updated %]" />
>[% END %]
>
>within the images-object, I have access to the pager-object like this;
>
>images.pager.previous_page, images.pager.current_page,
>images.pager.next_page or images.pager.last_page...

Ahhhhhhhhhhhhhhhhhh!

Based on your code examples, I was able to tweak my setup,
and get it to work. I have access to the pager and its goodies.
Thank you so much.

And thanks to all who responded. Open source forever!!

/dennis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070102/bf9df13b/attachment.htm


More information about the Catalyst mailing list