Welcome Guest, Not a member yet? Register   Sign In
Not adding in themes path
#1

[eluser]xtremer360[/eluser]
Trying to figure out why my config items are not getting put into the view file. It says <p>Unable to load the requested file: //email/registration-html.php</p></div>. It echos those values everywhere else.

site_config.php
Code:
/* TEMPLATE SETTINGS */
$config['themes_path'] = 'themes';
$config['default_theme'] = 'peach';


register.php
Code:
$this->functions_model->send_email('registration', $post_email_address, $this->data);

functions model.php
Code:
/**
  * Send email message of given type (activate, forgot_password, etc.)
  *
  * @param string $email_type
  * @param string $email_address
  * @param array $data
  * @return void
  */
function send_email($email_type, $email_address, $data)
{
  var_dump($this->config->item('themes_path', 'site_config'));
        var_dump($this->config->item('default_theme', 'site_config'));
        $this->email->from($this->config->item('site_email', 'site_config'), $this->config->item('site_title', 'site_config'));
  $this->email->reply_to($this->config->item('site_email', 'site_config'), $this->config->item('site_title', 'site_config'));
  $this->email->to($email_address);
  $this->email->subject(sprintf($this->config->item($email_type.'_subject', 'site_config'), $this->config->item('site_title', 'site_config')));
  $this->email->message($this->load->view($this->config->item('themes_path', 'site_config').'/'.$this->config->item('default_theme', 'site_config').'/email/'.$email_type.'-html', $data, TRUE));
  $this->email->set_alt_message($this->load->view($this->load->view($this->config->item('themes_path', 'site_config').'/'.$this->config->item('default_theme', 'site_config').'/email/'.$email_type.'-txt', $data, TRUE)));
  $this->email->send();
}
#2

[eluser]Aken[/eluser]
Did you load the config file anywhere prior to this code? You have to load config files, not just create them.
#3

[eluser]xtremer360[/eluser]
The config file is auto loaded. It works everywhere else so far. Do I need to do something different since I'm calling the items from a model and not a controller.
#4

[eluser]xtremer360[/eluser]
Any ideas?
#5

[eluser]xtremer360[/eluser]
Should have removed the site_config from the second parameter as its not an array.




Theme © iAndrew 2016 - Forum software by © MyBB