Can you add segments after the pagination page number? (uri_segment)

is there a way to modify the url used by pagination so that I can specify where the page segment can be added like:

“http://localhost/controller/function/” . $uri_segment . “/sortby/ascending/tab1/”;

This way I can always use segment 3?

I have a page with 4 tabs, and all 4 tabs have pagination - so I want to use a separate segment for each tabs page number

Looking at the code in the pagination class, it appends the incrementing offset to the end of the uri string initialized as $config['base_url']. In order to change this behavior, you would need to extend the the Pagination class and rewrite the create_links() function to accept a parameter for before and after segment variable.

Wouldn't you be able to create a set of pagination links for each tab? If you have different segments to distinguish each page, I don't think it would matter if you append the offset at the end of each of them.

I'm using jquery ui tabs (

So the 4 tabs are actually all on one page

If you are using jQuery, should make this even easier. Write a javascript function that takes parameters, (tab, target). Maybe if post some of your code, I could offer a better answer. I have done this recently on a site as well, and I didn't have to change the uri segment for each one. Use jQuery to set some variables you can pass to a controller, and then after you receive the updated response, use the variables to replace the content in the appropriate tab.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.