CodeIgniter Forums
Pagination and filtering products - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Pagination and filtering products (/showthread.php?tid=49940)



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.