Welcome Guest, Not a member yet? Register   Sign In
Pagination Class how to use url with current page number?
#1

[eluser]Ngulo[/eluser]
Hi guys i have a question.

i'm using standard pagination class as shown:
Code:
$offset = $this->uri->segment(2);
            
            $per_page = 5;
            
            $pagination['per_page'] = $per_page;
            $pagination['base_url'] = site_url('news');
            $pagination['total_rows'] = count($populateNews);
            $pagination['uri_segment'] = 2;
            $pagination['first_link'] = 'first';
            $pagination['last_link'] = 'last';
            $pagination['next_link']  = 'next';
            $pagination['prev_link']  = 'prev';
            $pagination['num_links'] = 10;
            $this->pagination->initialize($pagination);

            $view['news'] = array('list'=>array_slice($populateNews,$offset,$per_page));

but all my pagination urls looks like this:

www.site.com/news/$per_page

and i would like the standard url:

www.site.com/news/$current_page

is it possible for you?

thanks.. Wink
#2

[eluser]Giorgio Nordo[/eluser]
You are probably looking for this
#3

[eluser]Ngulo[/eluser]
yess really thanks ! Smile
#4

[eluser]Ngulo[/eluser]
really nice to see other italians people on CI community Smile

i was forgetting about... Smile




Theme © iAndrew 2016 - Forum software by © MyBB