How to get site variable in controllers
Hi, can anybody please let me know how to get the value of a site variable in my controller method?
I'm using fuel_var('some_variable_key') but it works only in my view files. In controller it returns nothing. Is there other way how to get the value there?
Thanks.
Comments
$page_init = array('location' => 'contact'); $this->load->module_library(FUEL_FOLDER, 'fuel_page', $page_init); $this->fuel_page->add_variables($vars); $this->fuel_page->render();
Where contact is the URI location.
$this->load->module_model(FUEL_FOLDER, 'sitevariables_model'); $email = $this->sitevariables_model->find_one(array('name' => 'email_address'));