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

[eluser]InsiteFX[/eluser]
What is it that you need to do?

InsiteFX
#12

[eluser]carvingCode[/eluser]
I was hoping to reduce the 7 pagination config statements to one. I'm using the settings in multiple methods.
#13

[eluser]cahva[/eluser]
So whats the problem? BTW, you can use the shorter version of getting config item:
Code:
config_item('first_tag_open');
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..
#14

[eluser]carvingCode[/eluser]
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?

Code:
$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'] = ' ';
#15

[eluser]danmontgomery[/eluser]
http://ellislab.com/codeigniter/user-gui...ation.html

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.
#16

[eluser]carvingCode[/eluser]
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