CodeIgniter Forums
difficulties with pagination - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: difficulties with pagination (/thread-53805.html)

difficulties with pagination - El Forum - 08-09-2012

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.

function images($udi, $page = 0)
$config['base_url'] = "http://localhost/mik/index.php/restricted/images/$uid/";

So, the first time the method is accessed, if I want userid 3's images to view, the url should be

now, when I want to view the next set of images (assuming 3 are viewed per page), the url should be
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?


difficulties with pagination - El Forum - 08-09-2012

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 Smile