Which method can be used in Codeigniter to achieve active menu tabs?
For example I have a user menu Profile Friends Messages Logout
When I\'m in th
There is a simple example how to create controller based active menu.
$ci =& get_instance();
// get the current controller
$controller = $ci->router->fetch_class();
// you can generate this array dynamically
$resources = array(0 => array("controller" => "home", "title" => "Home"),
1 => array("controller" => "products", "title" => "Products"),
2 => array("controller" => "services", "title" => "Services"),
);
Of course, you can create more complex navigation menu based on both controllers and methods.