[Catalyst] RE: DBIx::Class/TT Pager Question

Dennis Daupert ddaupert at sbcglobal.net
Sun Dec 31 21:13:57 GMT 2006


Leandro wrote:
>Maybe you should try this... 
>my $page = $c->req->params('page') || '';
>$c->stash->{photos} = [$c->model('CatapultDB::Photos')->search(
>    {
>      'gallery.id' => $selected_gallery
>    },
>    {
>      join     => [qw/ gallery /],
>      prefetch => [qw/ gallery /],
>      rows     => 2,
>      page     => $page,
>    }
>)->all];

Leandro, that does work. Woo hoo!
I will go ahead and use that method, for now, 
but it means I'll have to keep track of the pages
manually. I will keep working at trying to 
make contact with the pager method, since that
will get to the goodies like the pager.previous_page
and pager.next_page. Even so, it's a relief to
get this part working. I thank you very much!

/dennis

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


More information about the Catalyst mailing list