Welcome Guest, Not a member yet? Register   Sign In
Pagination class, previous link
#1

[eluser]dragon75[/eluser]
Hello,

When i use paginationc class with this code :
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 &gt;&gt;</span>';
$config['prev_link'] = '<span>&lt;&lt; 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 :
Quote:Firt | Previous | 1 | 2 | 3 | 4 | 5 | Next | Last

All works but...
The link on
Quote:| 1 |
is : mylink.com/whatiwant/

But the link on
Quote:| 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.

#2

[eluser]Aken[/eluser]
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).




Theme © iAndrew 2016 - Forum software by © MyBB