On 12/29/06, Dennis Daupert <[EMAIL PROTECTED]> wrote:
I'm having a bit of a go of getting all the bits in place to do paging.
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...
Good luck :)
--
Kay Bærulfsen
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/