Welcome Guest, Not a member yet? Register   Sign In
Site level settings
#1

[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
#2

[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
#3

[eluser]sureshls[/eluser]
Thanks Pert,

You mean, $config['search_visibility'] = 'TRUE' //on

In header view,

if($config['search_visibility'])
echo <div>&lt;input type="text"&gt;&lt;/div>

is it correct? Whether i will able to access the settings through view
#4

[eluser]Pert[/eluser]
Kind of, yes.

You will be able to do this in your view files:

Code:
&lt;? if ($this->config->item('search_visibility')) : ?&gt;
   &lt;input type="text"&gt;
&lt;? endif ?&gt;
#5

[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.




Theme © iAndrew 2016 - Forum software by © MyBB