Welcome Guest, Not a member yet? Register   Sign In
Pagination over method parameters not working
#1
Exclamation 
(This post was last modified: 03-18-2015, 07:03 AM by rakibtg.)

Hello CI Community,
i am having problem for the pagination over method parameters.
My routes:
PHP Code:
$route['tag/(:any)'] = 'tag/index/$1'

The pagination works just perfect until i press the next page link!

PHP Code:
$pager['base_url'] = '/tag/'.$tagDetail->slug
this is how i have setup the base url in my tag controller index method but the problem is when i visit the index  method with a parameter then it shows "404 Page Not Found" if you want you can take a look at the production site here > Free People Photo now at the bottom from the pager click on the next page then it shows 404 exception, any idea for this situation?

Edit:
If i add the method name in the pagination's base_url like this
PHP Code:
$pager['base_url'] = '/tag/index/'.$tagDetail->slug.'/'
then the limit query override the limit with the tag slug! Look at the last part of the query:
Code:
... ORDER BY p.date DESC LIMIT people,20
in this query the limit has been replaced by the parameter of the index method of the tag controller! I need help...

Have a great day.
Reply


Messages In This Thread
Pagination over method parameters not working - by rakibtg - 03-17-2015, 11:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB