I tried that and it didnt work.

It seems to only work if I call $config['attributes'] = array('class' => 'pagination_links'); just before calling $this->pagination->initialize($config); in the controller/method where I want pagination.

Since I am using pagination in a lot of places, I was hoping to avoid repeating that line $config['attributes'] = array('class' => 'pagination_links'); all over the place and instead just have it in /config/pagination.php, which is not working.



On Thu, Sep 8, 2016 at 10:08 AM, Makhanu Sinja <jeysinja@gmail.com> wrote:
Loading a custom config file in a controller. You can do it using autoload or do it manually in a controller. Try this in your controller

         $this->config->load('pagination');


On Wednesday, September 7, 2016, Peter Karunyu via skunkworks <skunkworks@lists.my.co.ke> wrote:
My global configurations for pagination are in /config/pagination.php.

In that file, the line below seems to have no effect (i.e. the class is not applied to each anchor):

// If you want to add a class attribute to every link rendered by the pagination class
$config['attributes'] = array('class' => 'pagination_links');

However, if I add the same line to the controller/method where I am using it (as show below), it works fine.

$config['attributes'] = array('class' => 'pagination_links');
$this->pagination->initialize($config);

What am I missing?


--
--
Kind Regards.
Makhanu Sinja.
+254 (0) 78868 0868
I do know everything, just not all at once. It's a virtual memory problem.