PHP code example of lotus / navmenu

1. Go to this page and download the library: Download lotus/navmenu library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lotus / navmenu example snippets


composer 

$type = 'user';
Menu::setMenuArray ( $navbarArray,[ 'class' => 'nav nav-bar' ], $type );

echo Menu::render ();

echo Menu::renderBreadcumb ();

$lavel = 0;
echo Menu::getActiveMenu($lavel);

$navbarArray = [ 'home' => [ 'label' => 'Home', 'url' =>  ( '/Home' ), 'icon'=>'fa fa-home' ],
	    'View' => [ 'label' => 'View', 'url' => '',
			 'child' => [
				 'user_related' => [ 'label' => 'User Related', 'url' => '#'  ]
			]
		 ],
		'AboutUs' => [ 'label' => 'About Us', 'url' => '#' , 
			'child' => [ 'aboutus' => [ 'label' => 'About Us', 'url' =>  ( '/About-us' ) ],
				     'contactus' => [ 'label' => 'Contact Us', 'icon' => 'fa fa-envelope', 'url' =>  ( '/Contactus' ) ]
				 ] 
			],
		'usermenu' => [ 'label' => 'Login', 'icon' => 'fa fa-sign-in', 'url' => "#", 'atribute' => [ 'onClick' => "log_in();" ] ] 
	];