is it possible to add a view All results link after or before the << First 1 2 3 Last >> links of the pagination?
I tried some thing like :
// in controller (search) :
if(uri_string()=='/search/results/all'){
$config['per_page'] = $config['total_rows'];
}else{
$config['per_page'] = 10;
}
$page['pagination'] = $this->pagination->create_links();
// and in the view :
echo $pagination .' '. '<a href="/search/results/all">View all results</a>';
Does anyone knows a better way?
I think the better way is to extend the CI pagination class. For example:
You can find a good example here: http://codeigniter.com/wiki/Digg_Style_Pagination_-_Non_evasive_aproach