Welcome Guest, Not a member yet? Register   Sign In
ME HMVC + custom library + fetch_module() does not work right
#4

[eluser]wilso417[/eluser]
I always get it to return a value, just not the value i'm expecting. I do a hack where I turn the module_name back to the parent module name after a function call.

so here is an example where on a page I want a partial view of a side menu that comes from a dashboard module:

function index() {

$this->load->module('dashboard');
$side_nav = $this->dashboard->fetch_side_nav($this->module_name);

echo $this->router->fetch_module();

}

function fetch_client_nav($module_name = NULL) {

// generate side nav

// set the router's module back to the parent module name because it gets changed automatically by HMVC
if (!empty($module_name)) $this->router->module = $module_name;

return $side_nav;
}


Messages In This Thread
ME HMVC + custom library + fetch_module() does not work right - by El Forum - 05-09-2012, 08:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB