You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Menu library.
Will show/hide sub-menus depending on in which, uri->segment the user is browsing.
Just add it in to autoload.
I call it from the view file like this:
[code]
$menu = $this->menu->mkmenu();
[/code]
Where ever in the view file you like to have your menu you would enter this:
[i]Make sure you also load the html helper for ul[/i]
[code]
<?=ul($menu,array('class' => 'menu','id' => 'menu'));?>
[/code]
And here you create your menu
$menu is your main menu. Each main menu may have one sub menu
[code]
class Menu
{
function Menu()
{
log_message('debug', 'Menu: initialized');
}
function mkMenu()
{
$CI =& get_instance();