• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Site level settings


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?


You can set up your own custom configuration file and autoload it. More details here:


Thanks Pert,

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

In header view,

echo <div>&lt;input type="text"&gt;&lt;/div>

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

Kind of, yes.

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

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

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.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.