CodeIgniter 2 Pagination problem |
[eluser]Unknown[/eluser]
Hello guys ! I have a problem whit my codeigniter setup , basically the pagination does not work as it should for example : I can go to page 2 or 3 but you cannot go back to page 1 because page 1 is not a link here is my code : Code: $route['category/(:any)/(:any)'] = 'category/index/$1/$2'; Code: public function page($category = '', $filter = '', $page = ''){ the website is this : http://goo.gl/iJyCV any ideas ? // update after some quick debuging I've find out that the second route does not work it's remaping to index method not the page method .
[eluser]TheFuzzy0ne[/eluser]
Welcome to the CodeIgniter forums! I can't even see where your pagination is supposed to be, but if you design your controller a little differently, you can remove one of your routes. Code: function index() Then this route might do the trick: Code: $route['category/(:any)/(:any)(/page/(:num))?'] = 'category/page/$1/$2/$4'; If you really want to do it your way, just switching the routes around might fix it.
[eluser]Unknown[/eluser]
Thank you ! also thank you for your reply I just don't know what happened but now it just works whit no modification . I think there is a bug somewhere ... |
Welcome Guest, Not a member yet? Register Sign In |