• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can you check my pagination?[SOLVED]

#11
(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
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
(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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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