CodeIgniter Forums
Pagination and filtering products - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter Archived (from EllisLab) (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Pagination and filtering products (/thread-49940.html)



Pagination and filtering products - El Forum - 03-08-2012

[eluser]0v3rth3d4wn[/eluser]
Hi! I'm trying to accomplish a pagionation with filters from a dropdownbox.
My question is should I use query strings and use the $_GET array (I personally don't like this approach) or should I use uri segments aka. passing variablse to the method - something like this (i'm routing the index function and everything after 'category' are passed variables) http://www.mysite.com/en/category/clothes/t-shirts/size/gender/page. But this way my url will look like http://www.mysite.com/en/category/clothes/t-shirts/1/2/2 which is not nice and my method will have like 6-7 variables which are also becoming url segments. I can also translate the filters to something like /asc/male/2.

Can you tell me a good way to accomplish this? I mean should I pass the filters like varr to my method? I'm using this method to pass my page for the pagination so I guess it's the same thing? Thanks.