Closed imevul closed 10 years ago
That's great; I had the same problem and that solved it. Now I have the same issue when calling the smarty method "fetch". Do you have any idea how to solve it ?
$this->parser->fetch('news.tpl'); // Works only when called from the same module !
It seems that if you call Modules::run('differentModule/controller') in a Smarty template, then any templates loaded in that module will not be found. This is because the current module is no longer $this->_module. I don't know if this is a bug though or if I'm doing something wrong, but I thought I'd report it along with my solution.
Modifying _find_view() around line 310 in MY_Parser as follows seems to solve the changing module problem. This will detect the module change and inject the relevant paths just for this template call.