Pagination based on page/# instead of uri segment |
[eluser]Ki[/eluser]
I have a case where a lot of variables get passed to the mathod inside the controller and page number changes its position within the uri... for example: /catid/12/city/34/page/20 - will show results in category 12, city #23 ... However, if the user decides to remove the city filter the next uri may look like: /city/34/page/20 and if subsequently user decides to remove city filter and add another category filter for results, the new uri may be: /page/20/catid/23 Within the method, I simply look at url_array which is caclulated by Code: $this->data['url_array'] = $this->uri->uri_to_assoc(2); Is there a way to bind pagination to page/# combination within the uri, regardless of where it is? Note: I am currently using non CI pagination class that I adapted to my needs...
[eluser]deadelvis[/eluser]
BUMP Excellent question... I'm also looking for an answer to this.
[eluser]deadelvis[/eluser]
FYI... I ended up solving my problem by using this excellent extension of the pagination class: http://ellislab.com/forums/viewthread/51505/P0/
[eluser]Ki[/eluser]
Thank you! I will implement it within the next few days on the development and see how it works... thank you for the link :-) Kirill |
Welcome Guest, Not a member yet? Register Sign In |