php - codeigniter 3.0 pagination with get parameter -


i have use codeigniter pagination, add parameter url. problem when change next page of parameter disappear

example url+ parameters:

http://localhost/test/index.php/search/product/?sort_by=price&order=asc

when click page 2 next page, url become this:

http://localhost/test/index.php/search/product/5

i want url become this:

http://localhost/portofolio2/index.php/search/product/5?sort_by=price&order=asc

===========================================================================

update<<

i add $config['suffix'] $config array, when go next page parameter didn't dissapear. there new problem, when navigate first page parameter dissapear again.

this $config pagination looks like

'base_url' => base_url() . 'index.php/search/product/',         'suffix' => '?sort_by=' . $sort_by . '&order=' . $order,         'use_global_url_suffix' => true,         'reuse_query_string' => false,         'total_rows' => $this->products_model->total_row(),         'per_page' => 5,         'num_links' => 20,         'full_tag_open' => '<ul class="pagination">',         'full_tag_close' => '</ul>',         'first_link' => false,         'last_link' => false,         'first_tag_open' => '<li>',         'first_tag_close' => '</li>',         'prev_link' => '&laquo',         'prev_tag_open' => '<li class="prev">',         'prev_tag_close' => '</li>',         'next_link' => '&raquo',         'next_tag_open' => '<li>',         'next_tag_close' => '</li>',         'last_tag_open' => '<li>',         'last_tag_close' => '</li>',         'cur_tag_open' => '<li class="active"><a href="#">',         'cur_tag_close' => '</a></li>',         'num_tag_open' => '<li>',         'num_tag_close' => '</li>', 

thanks

http://www.codeigniter.com/userguide3/libraries/pagination.html#customizing-the-pagination

and $config[‘reuse_query_string’] = false;

//update (problem first page):

after $config:

$config['first_url'] = $config['base_url'] . $config['suffix']; 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -