codeigniter-template icon indicating copy to clipboard operation
codeigniter-template copied to clipboard

Modules::run() loading views

Open weblogics opened this issue 11 years ago • 1 comments

When using the Modules::run() for dynamically loading views such as:

$this->load->module('module_name');
$this->module_name->index();

or

echo modules::run($module->module);

The problem is that you are using the:

$this->_module = $this->_ci->router->fetch_module();

The problem is this is NULL when using the run() or load->module() methods.

Is there a fix for this.

weblogics avatar Aug 03 '12 18:08 weblogics

You can try to change the module.php the run method

The following example is I have to use the fix solution:

1.Open the third_party/MX/Modules.php 2.Near 75 lines to find

$buffer = ob_get_clean();

3.Increase in its following:

if($output === NULL && $buffer === '')
{ 
     $output = CI::$APP->output->get_output(); 
}

At this time, it should be able to work properly...

hicode avatar Oct 26 '12 05:10 hicode