Welcome Guest, Not a member yet? Register   Sign In
Custom Configuration File For Application

What is it that you need to do?


I was hoping to reduce the 7 pagination config statements to one. I'm using the settings in multiple methods.

So whats the problem? BTW, you can use the shorter version of getting config item:
That helper function is always available.

Maybe we can give some advice if we can see code how you are using those config items now..

The statements for part of the settings of the Pagination library. Instead of including them, as listed below, I thought I could place them in a app config file and just call an array. Is this where a 'hook' may come in handy?

$config['first_tag_open'] = ' | ';
$config['first_tag_close'] = ' |';
$config['last_tag_open'] = '| ';
$config['last_tag_close'] = '| ';
$config['num_tag_open'] = ' | ';
$config['next_tag_open'] = ' | ';
$config['next_tag_close'] = ' ';


Quote:Setting preferences in a config file

If you prefer not to set preferences using the above method, you can instead put them into a config file. Simply create a new file called pagination.php, add the $config array in that file. Then save the file in: config/pagination.php and it will be used automatically. You will NOT need to use the $this->pagination->initialize function if you save your preferences in a config file.

Zowie! I was all over that page in the docs earlier in the week. Missed this. Thanks!

Edit: All is working great.

Theme © iAndrew 2016 - Forum software by © MyBB