Welcome Guest, Not a member yet? Register   Sign In
Multiple Pagination Config
#1

[eluser]bunal[/eluser]
Hi,

I have pagination.php config set but in the admin part of the site i want to have different pagination config file to be used. For example "pagination_admin.php".

For the admin i am using Admin_Controller and in the admin controller i am trying to load the admin pagination config file but these values get overwritten by the pagination class since it loads the "pagination.php" as default.

Anyone has any ideas?
#2

[eluser]bunal[/eluser]
What i achieve is to load pagination_admin into it's associative config array in my Admin_Controller

Admin_Controller
Code:
$this->load->config('pagination_admin', TRUE);
$this->pagination_config = $this->config->item('pagination_admin');

Then use it in the admin pages of the site as

Code:
$this->pagination_config['base_url'] = current_url();
$this->pagination_config['total_rows'] = $recordCount ;
$this->pagination->initialize($this->pagination_config);

Any other cleaner ideas?




Theme © iAndrew 2016 - Forum software by © MyBB