Welcome Guest, Not a member yet? Register   Sign In
What would be the best approach to this issue?
#1

[eluser]developer10[/eluser]
Hi,

I'm dealing with CI pagination right now. To be honest, I'm not very pleased with it because in my opinion it lacks some important stuff, one of them being the fact that the number at the end (segment) shows the record number to show records from, instead of representing the page number.

and another would be that i dont see any easy way of putting the word eg. "start" before the number. For example:
Code:
www.example.com/index.php/show/projects/orderby/published/type/desc/start/4

What is the best practice in resolving such issues?
Thanks
#2

[eluser]developer10[/eluser]
F5
#3

[eluser]InsiteFX[/eluser]
Maybe extend the pagination class to do what you want.

InsiteFX
#4

[eluser]cahva[/eluser]
Yeah, extending the class is what I would do. You might also want to check out the wiki as I see there lots of different pagination libraries that might suit you.
#5

[eluser]Twisted1919[/eluser]
You can go like this without extending the class :
Code:
$orderby = $this->uri->segment(4,'published');
$type = $this->uri->segment(6,'desc');

$this->load->library('pagination');
$config['base_url'] = site_url().'show/projects/orderby/'.$orderby.'/type/'.$type.'/start/';
$config['total_rows'] = $total ;
$config['per_page'] = $per_page ;
$config['uri_segment'] = 8;
$config['num_links'] = 2;
[]....[]
$this->pagination->initialize($config);
$this->data['pagination'] = $this->pagination->create_links();




Theme © iAndrew 2016 - Forum software by © MyBB