• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
difficulties with pagination

#1
[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)
$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
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.

#2
[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 Smile


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.