CodeIgniter Forums

Full Version: Bug pagination previous and first link
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum


I use this simple code :

   $config['base_url']         = '/';
   $config['total_rows']       = 62;
   $config['use_page_numbers'] = TRUE;
   $config['uri_segment']      = 3;
   $config['full_tag_open']    = '<div id="pagination">';
   $config['full_tag_close']   = '</div>';
   $config['prev_link']        = '&lt; Previous';
   $config['next_link']        = 'Next &gt;';
   $config['display_pages']    = FALSE;
   $config['first_url']        = '';
   $config['suffix']           = '.html';
   $config['prefix']           = 'page-';
   $config['per_page']         = 42;

I want this type of Pagination : << Previous Next >>

On the first page (without any query string), i have this link : Next >> to page-2.html It's ok
On the seconde page (page-2.html), i have this link : << Previous to page-1.html It's not OK

Indeed, for me, if you are on the seconde page, and you click to "Previous", you should have the base_url() link but not "page-1.html".

Thank you for your help.