Welcome Guest, Not a member yet? Register   Sign In
Routing issue - Pagination not working properly
#13

[eluser]Mauricio de Abreu Antunes[/eluser]
Hi!

My routes.php
Code:
$route['default_controller']  = 'welcome';
$route['404_override']    = '';
//Route para noticias.
$route['news/(:num)']   = 'news/index/$1';

My news.php (controller)
Code:
public function index() {  
   //Retorna o segmento da página.
   $offset     = (int) $this->uri->segment(2);
   //Total de notícias para listar.
   $config['total_rows']  = $this->news_model->contaNoticias();
   $config['per_page']  = 2;
   $config['base_url']  = $this->config->item('base_url') . 'news/';
   //Inicializa a paginação.
   $this->pagination->initialize($config);  
   $dados['news']   = $this->noticias_model->listaNoticias($offset, $config['per_page']);
   $dados['paginacao']  = $this->pagination->create_links();
   //Carrega a view de dados.
   $this->load->view('news_view', $dados);
  }

My pagination.php (config)
Code:
//Primeiro e último link.
$config['first_link']  = 'First page';
$config['last_link']  = 'Last page';
//Próximo e Anterior
$config['next_link']  = '>';
$config['prev_link']  = '<';


Messages In This Thread
Routing issue - Pagination not working properly - by El Forum - 02-13-2012, 11:00 AM
Routing issue - Pagination not working properly - by El Forum - 02-13-2012, 12:42 PM
Routing issue - Pagination not working properly - by El Forum - 02-13-2012, 08:49 PM
Routing issue - Pagination not working properly - by El Forum - 02-14-2012, 08:24 AM
Routing issue - Pagination not working properly - by El Forum - 02-14-2012, 01:25 PM
Routing issue - Pagination not working properly - by El Forum - 02-14-2012, 03:09 PM
Routing issue - Pagination not working properly - by El Forum - 02-14-2012, 04:27 PM
Routing issue - Pagination not working properly - by El Forum - 02-14-2012, 04:37 PM
Routing issue - Pagination not working properly - by El Forum - 02-14-2012, 04:52 PM
Routing issue - Pagination not working properly - by El Forum - 02-14-2012, 05:01 PM
Routing issue - Pagination not working properly - by El Forum - 02-14-2012, 05:07 PM
Routing issue - Pagination not working properly - by El Forum - 02-14-2012, 05:36 PM
Routing issue - Pagination not working properly - by El Forum - 02-14-2012, 05:48 PM
Routing issue - Pagination not working properly - by El Forum - 02-14-2012, 05:49 PM
Routing issue - Pagination not working properly - by El Forum - 02-14-2012, 06:13 PM
Routing issue - Pagination not working properly - by El Forum - 02-14-2012, 07:34 PM
Routing issue - Pagination not working properly - by El Forum - 02-14-2012, 08:06 PM
Routing issue - Pagination not working properly - by El Forum - 02-14-2012, 08:33 PM
Routing issue - Pagination not working properly - by El Forum - 02-14-2012, 08:51 PM
Routing issue - Pagination not working properly - by El Forum - 02-14-2012, 08:56 PM
Routing issue - Pagination not working properly - by El Forum - 02-14-2012, 09:44 PM
Routing issue - Pagination not working properly - by El Forum - 02-14-2012, 10:30 PM
Routing issue - Pagination not working properly - by El Forum - 02-14-2012, 10:50 PM
Routing issue - Pagination not working properly - by El Forum - 03-06-2012, 04:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB