Hi,
i’m trying to get Jérôme Jaglales Template Library (http://maestric.com/en/doc/php/codeigniter_template) running along with HMVC.
This is the library:
class Template {
var $template_data = array();
function set($name, $value)
{
$this->template_data[$name] = $value;
}
function load($template = '', $view = '' , $view_data = array(), $return = FALSE)
{
$this->CI =& get_instance();
$this->set('content', $this->CI->load->view($view, $view_data, TRUE));
return $this->CI->load->view($template, $this->template_data, $return);
}
}
and this is a part from my folder structure:
application
- modules
-front
- views
- partial.php
- views
- home.php
When i try to load
$this->template->load('home', 'partial', $this->data);
from my controller, the ‘partial’-view is not found, because the library only looks in the global view folder.
How can i make it include the partial view from my module-view folder?
Any help is greatly appreciated.
Cheers,
Mark
