Welcome Guest, Not a member yet? Register   Sign In
problem with pagination library
#1

[eluser]Tống Kiện Phi[/eluser]
I use this code:

Code:
$config['pagination'] = array(
    'page_query_string' => TRUE,
    'query_string_segment' => 'page',
    'full_tag_open' => '<div id="page_footer">',
    'full_tag_close' => '</div>',
    'anchor_class' => 'class="pagecurrent"',
    'next_link' => '&raquo;',
    'prev_link' => '&laquo;'
);
$this->pagination->initialize(
array_merge(
  $this->config->item('pagination'),
  array(
   'total_rows' => $this->_data['contents']['total'],
   'per_page' => 25,
   'base_url' => site_url('acp/content/manager') . '?p',
   'first_url' =>  site_url('acp/content/manager') . '?p'
  )
)
);

When i run it, it work well but page display have problem, it not display page=1, page=2, it's display page=25, page=50 .. i don't know why, in the old version it's normal, when i download new version to use it's become like that
#2

[eluser]Oscar Dias[/eluser]
The pagination class is using the offset instead of the page number. If you want to change this, you have to add:
Code:
$config['pagination'] = array(
    //...
    'use_page_numbers' => TRUE
);




Theme © iAndrew 2016 - Forum software by © MyBB