
WillPaginate formatting?
Reported by Cameron Yule | October 27th, 2008 @ 09:17 AM
This is a feature request rather than a bug report. :)
I've been wondering if it's easy/possible to use will_paginate for the output of the actual pagination rather than using the Searchgasm#page_select dropdown menu?
Having had a quick look around the WP internals, it's using a custom Collection class which is essentially an Array with a few additional attributes (current_page, per_page etc), so there'd have to be some kind of tie-up there.
Has anyone else attempted this yet?
Comments and changes to this ticket
-
Ben Johnson October 28th, 2008 @ 02:03 AM
- State changed from new to resolved
- Assigned user set to Ben Johnson
Feature requests are always welcome.
Searchgasm provides page_links and remote_page_links as a helper, which does the exact same thing as will_paginate. If you checkout the helpers configuration you will see options to alter the class names, etc. If you change those class name you can have page_links and remote_page_links output exactly like will_paginate.
Let me know if this helps.
-
Ben Johnson November 17th, 2008 @ 04:34 PM
Alright, you've convinced me. I'm not a big fan of the class names will_paginate chooses, but none the less its not my call. So I added:
config.helpers.page_links_act_like_will_paginate = true
I also added a few more configuration options. Just update from the repo and checkout the changelog.
Let me know if you have any issues.
-
Ben Johnson November 17th, 2008 @ 05:03 PM
Let me know how it goes, I never used will_paginate because I have always used searchlogic, even before I released it. I just installed will_paginate and took a look at the output. If you have any problems let me know what to change and I'll make it happen.
And I can never have too much beer, maybe we'll meet at railsconf.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Provides common named scopes and object based searching.