[eluser]JasonS[/eluser]
I am having some trouble loading a view within a module.
This is my file structure.
/helper/general_helper.php
/modules/admin/controllers/user.php
/view/message.php
The general_helper file has the following function in it.
Code:
function message($title="", $message="", $redirect="")
{
if ($redirect=="")
$redirect = base();
$ci =& get_instance();
$data['title'] = $title;
$data['message'] = $message;
$data['redirect'] = $redirect;
$ci->load->view('message', $data);
}
When I call this function from a controller in the 'controller' folder everything works fine. The view file loads.
If I call this function from user.php which is in the modules folder, I get an error message that the view file cannot be found. Does anyone know why this is happening? Without putting a duplicate view file in each module, is there another solution to this?