difficulties with pagination - 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: difficulties with pagination (/showthread.php?tid=53805) |
difficulties with pagination - El Forum - 08-09-2012 [eluser]bibiki[/eluser] Hey there, I built a few methods that use the pagination class. I have one methods where pagination works perfectly. So, I believe I know what I am doing. However, I have this other method where pagination won't work. The only suspect is that I am passing this other method two parameters, not one. Code: function images($udi, $page = 0) So, the first time the method is accessed, if I want userid 3's images to view, the url should be http://localhost/mik/index.php/restricted/images/3/ now, when I want to view the next set of images (assuming 3 are viewed per page), the url should be http://localhost/mik/index.php/restricted/images/3/3 and this link should be accessed by the link that looks like >=, however, the links generated by $this->pagination->create_links() are all messed up, and >= won't increase my $page variable correctly. any idea why? thanks. difficulties with pagination - El Forum - 08-09-2012 [eluser]bibiki[/eluser] I'm sorry... I used the $config['uri_segment'] now, and it now works. I set it to 4, it's perfect now. Thread solved. P.S. I read somewhere that if you try to describe your problem to someone, you will find the solution by trying to describe the problem. That just happened here, but I thought I would try that after I'd post, although I got the idea writing the question |