Closed candfe closed 10 years ago
I have one module fetching the view, like:
class News extends MX_Controller {
public function index() { $this->parser->parse('news.tpl'); } public function html() { return $this->parser->fetch('news.tpl'); }
}
But when I call it from a different module controller, it says news.tpl cannot be found !!!
class Page_Main extends MX_Controller {
public function index() { $data['title'] = 'Main Page'; $data['main'] = Modules::run('news/html'); $this->parser->parse('page_main.tpl', $data); }
Just figured out a way to use the .tpl view as data with:
return $this->parser->parse('news.tpl', '', TRUE);
I have one module fetching the view, like:
class News extends MX_Controller {
}
But when I call it from a different module controller, it says news.tpl cannot be found !!!
class Page_Main extends MX_Controller {
}