Hello everyone, It took me in CI 3 to do padjination with ajax means. Googling, I did the override of the link handler:

$(document).on('click', "div.table_pagination a",function(){ var urls = $(this).attr("href"); var value_arr = urls.split( '/page_number/' ); if ( value_arr.length == 2 ) { // we have page number load_related_users(value_arr[1]) } return false; }); 

And it works, with the exception that Padjination initially has 1st page as text, and the rest as links. How can I make ALL the links of the page are links and the current one can be selected / zadizeyblid?

Url page - in the application is used for other purposes, so I used page_number and to call

 $this->pagination->initialize($pagination_config); 

I used an array:

 $pagination_config::Array ( [per_page] => 4 [uri_segment] => 5 [num_links] => 10 [use_page_numbers] => 1 [page_query_string] => page_number [query_string_segment] => page_number ) 

Also in the link a different number of parameters is transmitted, therefore, to indicate the page number, you need to use a key by name ...

Thank!

    1 answer 1

    For ajax-requests added padge to konfu

     $config['cur_tag_open'] = ' <a href="#" class="active" >'; $config['cur_tag_close'] = ' </a> '; 

    As a result, the first element of the padzhination became the link and not the plain text but for it the rest of the parameters that I pass to

     $pagination_config['base_url'] = base_url() . 'sys-admin/clients_edit_load_related_users' . $PageParametersWithSort.'/page_number'; 

    where $ PageParametersWithSort are several parameters in the form of key / value

    The first element of the page has the link of the page itself.

     http://local-zntral.com/sys-admin/clients-edit/10 

    How to fix it ?