EllisLab text mark
Advanced Search
     
Pagination class, previous link
Posted: 22 November 2012 10:23 AM   [ Ignore ]
Joined: 2012-09-08
4 posts

Hello,

When i use paginationc class with this code :

$this->load->library('pagination');
$config['total_rows'200;
$config['base_url'$this->uri->segment(3);
$config['uri_segment'4;
$config['full_tag_open''<div class="pagination">';
$config['full_tag_close''</div>';
$config['next_link''<span>next >></span>';
$config['prev_link''<span><< previous</span> ';
$config['first_url'$this->uri->segment(3).'/';
$config['per_page'21;
$config['use_page_numbers'TRUE;
$config['suffix']'.html';
$this->pagination->initialize($config); 

I have something like this :

Firt | Previous | 1 | 2 | 3 | 4 | 5 | Next | Last

All works but…
The link on

| 1 |

is : mylink.com/whatiwant/

But the link on

| Previous |

is : mylink.com/whatiwant/1.html

And this is a duplicat content for me… I just want to have mylink.com/whatiwant/

How i can do ?


Best regards.

 
Posted: 23 November 2012 11:13 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2007-11-28
2435 posts

Change your base_url and first_url options to a full URL using site_url(), don’t use the segment (because then it could change on every page, which you don’t want).