Welcome Guest, Not a member yet? Register   Sign In
Can you check my pagination?[SOLVED]
#11

(This post was last modified: 02-10-2017, 11:13 PM by kirasiris. Edit Reason: forgot to mention )

(02-10-2017, 10:01 PM)pdthinh Wrote:
(02-10-2017, 12:50 PM)kirasiris Wrote: Ok, I did that as well, but it now shows just one entry, and apparently the same id. Basically it just showing one item rather than one different per page

Comment these two lines in your blog() may work:
PHP Code:
    // $config['query_string_segment'] = 'paginas';
 
   // $config['page_query_string'] = TRUE; 

Not to offend, but that was the first thing that I tried. It do not works(it changes the URL)

from:
http://localhost/demo6/blog/?page=1
to:
http://localhost/demo6/blog/1 (and so on)

It gives me a 404 error. Should I do something to the "routes" file?

Thanks for trying to help
I do Front-End development most of the time 
Reply
#12

(This post was last modified: 02-10-2017, 11:25 PM by pdthinh.)

PHP Code:
// $config['query_string_segment'] = 'paginas';
// $config['page_query_string'] = TRUE; 

If your controller is news and method is blog(), so the the route should like:

PHP Code:
// $route['blog'] = 'news/blog/index'; // comment this line to test
$route['blog/(:num)'] = 'news/blog/$1'
// $route['blog/(:any)'] = 'blog/view/$1'; // also comment this line 
Reply
#13

(This post was last modified: 02-10-2017, 11:52 PM by kirasiris.)

(02-10-2017, 11:14 PM)pdthinh Wrote:
PHP Code:
// $config['query_string_segment'] = 'paginas';
// $config['page_query_string'] = TRUE; 

If your controller is news and method is blog(), so the the route should like:

PHP Code:
// $route['blog'] = 'news/blog/index'; // comment this line to test
$route['blog/(:num)'] = 'news/blog/$1'
// $route['blog/(:any)'] = 'blog/view/$1'; // also comment this line 

Hey, it's working now :Smile Thanks  so much, I've been trying to figure out what was the problem with it. and finally you came out with it.
I could have done it by myself, but I never thougt that it was going to be just about changing the route file.
I do Front-End development most of the time 
Reply




Theme © iAndrew 2016 - Forum software by © MyBB