Pretty often I need to access $config
variables in views.
I know I can pass them from controller to load->view()
.
But it seems excessive to do it explicitly.
Is there some way or trick to access $config
variable from CI views without
disturbing controllers with spare code?
$this->config->item()
works fine.
For example, if the config file contains $config['foo'] = 'bar';
then $this->config->item('foo') == 'bar'