[eluser]Maxximus[/eluser]
Hi, trying to port things to 4.1 (07). I have the following issues, and I can't figure out how to handle this...
Code:
in modules/someclass/controllers/someclass.php:
Class Someclass extends Controller {
...
function showForm() {
$view = modules::run('vote/vote', $this->uri->rsegment(4), 'voteForm');
$this->render($view);
}
function render($data, $cache = FALSE) {
if ($cache) $this->output->cache($cache);
echo $data;
}
...
}
in modules/vote/controllers/vote.php
Class Vote extends Controller {
...
function voteForm($data) {
$view = $this->load->view('p_vote', $data, TRUE);
$this->render($view);
}
function render($data, $cache = FALSE) {
if ($cache) $this->output->cache($cache);
echo $data;
}
...
}
Will not return anything. Tried several things, like returning the data, direct echo etc.
If I use a modules::run() in a view, the whole view stops (without error msg):
Code:
<? echo modules::run('vote/vote', $rec['id'], 'overallResults'); ?>
So basically: calling another module/controller/method is not giving output, and used in a view will stop the view completely. Any idea?