Routing issue - Pagination not working properly |
[eluser]Mauricio de Abreu Antunes[/eluser]
I'm still getting error! Again: if i dont use routes, when i go for http://localhost/percutz/noticias/2 shows error 404. My .htaccess supress index.php from my controllers. http://localhost/percutz/index.php/noticias/ (i dont need this) If i go for http://localhost/percutz/noticias/index/2 shows properly. Please, help me to understand my error.
[eluser]Aken[/eluser]
Post your entire controller and routes as they sit right now.
[eluser]Mauricio de Abreu Antunes[/eluser]
Hi! My routes.php Code: $route['default_controller'] = 'welcome'; My news.php (controller) Code: public function index() { My pagination.php (config) Code: //Primeiro e último link.
[eluser]Mauricio de Abreu Antunes[/eluser]
[quote author="Aken" date="1329264103"]No, his URLs aren't working. That's why when he's on Page 2, it acts like Page 1, unless he includes the index() method.[/quote] I was wondering this, but what can i do?
[eluser]Aken[/eluser]
Add what I recommended above in post #7 to your controller. Also, your route doesn't need the extra stuff after news, since you aren't passing the pagination value as a parameter. Code: $route['news/(:num)'] = 'news';
[eluser]Mauricio de Abreu Antunes[/eluser]
[quote author="Aken" date="1329268403"]Add what I recommended above in post #7 to your controller. Also, your route doesn't need the extra stuff after news, since you aren't passing the pagination value as a parameter. Code: $route['news/(:num)'] = 'news'; It did not solve my problem. When i go for http://localhost/percutz/noticias It shows 1 2 > (its ok) But when i go for http://localhost/percutz/noticias/2 1 2 > (and i can not access 1 page anymore...)
[eluser]Aken[/eluser]
Does your route actually say news, or did you translate it to noticias? Also, a small fix to what I said about that route - you don't need the parentheses if you aren't going to reuse that segment. Code: $route['noticias/:num'] = 'news'; You have something small wrong somewhere. It might be worth starting from scratch and add code until you find where the problem is.
[eluser]Mauricio de Abreu Antunes[/eluser]
GOD, help me! I can not solve this. I just watched http://net.tutsplus.com/articles/news/co...agination/! I do the same thing and create_links is not working for me.
[eluser]Mauricio de Abreu Antunes[/eluser]
Something is wrong with my URL. http://localhost/percutz/noticias/index/2 (working) http://localhost/percutz/noticias/2 (not working) My .htaccess file can influence it? Code: DirectoryIndex index.php |
Welcome Guest, Not a member yet? Register Sign In |