PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sun Sep 22, 2019 5:56 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sat Feb 27, 2010 2:20 pm 
Offline
DevNet Resident
User avatar

Joined: Thu May 14, 2009 3:00 pm
Posts: 1011
Location: HellCity, Bulgaria


Top
 Profile  
 
PostPosted: Sat Feb 27, 2010 5:30 pm 
Offline
DevNet Master
User avatar

Joined: Fri Jan 18, 2008 1:36 am
Posts: 3549
Location: Israel, ME
Count and paginate manually. Not everything has to use ZF provided components - especially if they don't fit the scenario well.
I mostly use my own paginator instead of zend's


Top
 Profile  
 
PostPosted: Sun Feb 28, 2010 5:33 pm 
Offline
DevNet Resident
User avatar

Joined: Thu May 14, 2009 3:00 pm
Posts: 1011
Location: HellCity, Bulgaria
Thanks pytrin, I'll do it this way.
Getting the required subset of rows from the model, and the total count is really easily, as well as passing the page param around. Is there easy way to render the navigation, some ready-to-use view helper?


Top
 Profile  
 
PostPosted: Sun Feb 28, 2010 6:44 pm 
Offline
DevNet Master
User avatar

Joined: Fri Jan 18, 2008 1:36 am
Posts: 3549
Location: Israel, ME
Not that I'm aware of. I took the process phpBB uses to create their pagination almost as is, just cleaned it up a bit and made a helper out of it. It's somewhat of kludge, but I don't think there's an elegant solution to all those presentation conditionals. I've attached my version to this post


Attachments:
Pagination.zip [849 Bytes]
Downloaded 233 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group