Add dynamic products per page, i.e. links for 12, 24, 48, all products?

78 views
Skip to first unread message

Ross Rankin

unread,
May 19, 2012, 3:19:24 PM5/19/12
to spree...@googlegroups.com
So I see that Kaminari says in the read me that it supports it but I cannot find a way to allow users to dynamically change how many products are displayed per page.  My default is 12 products, i'd like links next to the "1 2 3 4 5 ... Next › Last » " links.  So ideally it would be "Products per page: 12, 24, 48, All  1 2 3 4 5 ... Next › Last »".  

Stack Overflow is hasn't be helpful, hoping someone can help here.  Thanks!

Ross

Olaf Tiemann

unread,
May 21, 2012, 2:21:51 PM5/21/12
to spree...@googlegroups.com
Something like
<%= link_to '50 per page', params.merge({:per_page => 50}) %>
should work to build custom links.

Cheers,
Olaf
> --
> You received this message because you are subscribed to the Google Groups "Spree" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/spree-user/-/5fhHsD78bZ8J.
> To post to this group, send email to spree...@googlegroups.com.
> To unsubscribe from this group, send email to spree-user+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Ross Rankin

unread,
May 21, 2012, 2:45:13 PM5/21/12
to spree...@googlegroups.com
Works like a champ!  Thanks!

Ross
Reply all
Reply to author
Forward
0 new messages