[eluser]CARP[/eluser]
Hi
I'm trying to have different pagination settings (one for common listings, one for search results). I've the following code
Code:
...
$data = array();
$this->load->model(array('article_abm', 'category_abm'));
$this->load->library('pagination');
$config['total_rows'] = $this->article_abm->qtty($tabla);
$config['base_url'] = site_url().'/article/pub_by/' . $param1;
$this->config->load('pagination_alt');
[b]//$config['uri_segment'] = 4;
//$config['per_page'] = '10';[/b]
$this->pagination->initialize($config);
echo '<font size="5">Debugging! ' . $config['uri_segment'] . '</font>';
$data['pagination_links'] = $this->pagination->create_links();
$data['title'] = "Welcome to ...";
1. The config/pagination_alt.php file already has these two lines inside:
$config['uri_segment'] = 4;
$config['per_page'] = '10';
But I have to re put those lines in each pagination construction. I mean, these seems not to be loaded when loading pagination_alt config file
2. Of course echoing $config['uri_segment'] throws error Message: Undefined index: uri_segment
3. The pagination shows, and loads a "per_page" value of 10. Where is being this 10 taken from?
4. I don't have a pagination.php file inside config folder. I renamed it on purpose
5. $config array has only "total_rows" and "base_url" and not all the rest options theoretically loaded from config/pagination_alt.php
What could be wrong? How can I debug this?