Site level settings |
[eluser]sureshls[/eluser]
Hi, We are doing ecom based. So we need to setup the few configurations like display the product per page, search settings (on/ off), country & currency settings. How to do that? Thanks
[eluser]Pert[/eluser]
You can set up your own custom configuration file and autoload it. More details here: http://ellislab.com/codeigniter/user-gui...onfig.html
[eluser]sureshls[/eluser]
Thanks Pert, You mean, $config['search_visibility'] = 'TRUE' //on In header view, if($config['search_visibility']) echo <div><input type="text"></div> is it correct? Whether i will able to access the settings through view
[eluser]Pert[/eluser]
Kind of, yes. You will be able to do this in your view files: Code: <? if ($this->config->item('search_visibility')) : ?>
[eluser]boltsabre[/eluser]
Another option would be to do it in a MY_Controller, and use $this->load->vars(), then you can also access them in your views. That's where I check/set a users "logged_in" status so I can show the correct login/logout box. But for what you're talking about it may make more semantic sense to do it in a config file. |
Welcome Guest, Not a member yet? Register Sign In |