Pagination and routing |
I've read several archived posts from Ellislab about pagination and I dont understand why its not working. URLs are my weakness and http in general.
Help!? In routes.php I have (second line down) PHP Code: $route['log/delete_img/(:any)/(:any)/(:any)'] = 'logs/delete_image/$1/$2/$3'; and PHP Code: //'uri_segment' => 3, controller PHP Code: public function log($slug = NULL) {
(:any) is a catch all! Look at your commands and then rearrange them.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(01-26-2016, 10:51 AM)InsiteFX Wrote: (:any) is a catch all! Look at your commands and then rearrange them. Thanks! I moved it all the way down but nothing changes. I think the view is incorrectly set up. Maybe the docs dont explain the logic enough? Missing something!! or my brain is missing something too! Here's the start of the view PHP Code: <?php if (!empty($log_entries)) { ?>
Try using just site_url() alone.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(01-26-2016, 03:14 PM)InsiteFX Wrote: Try using just site_url() alone. Thanks. I dont know Portuguese, but this youtube vid helped by Géssica Andrade @ https://www.youtube.com/watch?v=6IfIUsLVY2s I was missing the following and I'm not sure what its doing in the controller, but its working: PHP Code: $inicio = (!$this->uri->segment('4')) ? 0 : $this->uri->segment('4'); and then part of the pagination config PHP Code: $config = array( PHP Code: $route['log/(:any)/history/(:any)'] = 'logs/log/$1'; |
Welcome Guest, Not a member yet? Register Sign In |