• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Remove /index from pagination URL

#1
[eluser]surfgatinho[/eluser]
Hi,

I've not had too much trouble getting the pagination class to work but am having the following problem.

My base_url is sitename/members. Pages are sitename/members/5 etc. So far, so good! The problem is that the page (< 1 2 3 >) are not reflecting the current page.
I can fix this, but it involves changing the base_url to sitename/members/index which isn't really what I want.

Any ideas?

Many thanks in advance,
Chris

#2
[eluser]MadZad[/eluser]
Chris,
I'm not sure, but you might have to resort to either using 'index' in your base_url or creating another method in your controller, which is what I did. The problem is that CI will take your 'sitename/members' and find the index function in the members method, and will take 'sitename/members/anything' and try to find the anything function in the members method. You could try setting $config['uri_segment'] = 2 but that's a shot in the dark.

If putting 'index' in your base_url is really unpalatable, perhaps mod_rewrite or CI's routes might be worth looking into. Unfortunately, this is out of my expertise, so I can just be an idea guy here...

Any smarter folk out there have better or more detailed ideas?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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