![]() |
Pagination URI - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Pagination URI (/showthread.php?tid=50077) |
Pagination URI - El Forum - 03-13-2012 [eluser]Perkin5[/eluser] I have set up pagination for my project and it works fine. But when I navigate away from the 'paginated page', I want to be able to return to the same page. I note that the URI has the offset added to it and I have used this: Code: $this->session->set_userdata('current',current_url()); to grab that uri. But then if I try to navigate to Code: $this->session->userdata('current'); the page can't be found - because of the offset. I'm sure I'm setting about it the wrong way but I've thought about it quite a bit and I can't work it out. Can anyone advise please? Pagination URI - El Forum - 03-13-2012 [eluser]Gerep[/eluser] What is been returned by the Code: userdata('current') Pagination URI - El Forum - 03-13-2012 [eluser]Perkin5[/eluser] Code: userdate('current') I used this: Code: $this->session->set_userdata('current',$this->uri->segment(3)); Which appears to have successfully grabbed the third segment. So now I can do: Code: redirect('shop/item/'.$this->session->userdata('current')); and that seems to work. Am I doing that the right way? |