asifa
asifa

Reputation: 771

pagination first link disabled codeigniter

I am using codeigniter pagination. The first link is disabled and the rest of the links are working. Even after going to the 2nd and 3rd link the first link remains disabled.

Controller

$this->load->library('pagination');
$config['base_url'] = base_url().'/le0wallt1esadmin/specialoffer/viewsp/';
$config['total_rows'] = $this->db->count_all('home');
$config['per_page'] =5;
$config['use_page_numbers'] = TRUE;
$config['uri_segment'] = 4;  
    $this->pagination->initialize($config);

Thanks,

Upvotes: 0

Views: 1826

Answers (1)

Taha Paksu
Taha Paksu

Reputation: 15616

it is the current pagination behaviour of the codeigniter pagination library. to override this, you can specify

$config["cur_tag_open"] = "<a href='" + current_url() + "'>";
$config["cur_tag_close"] = "</a>";

and then you'll have the current page link.

Upvotes: 1

Related Questions