lotus/navmenu
Composer 安装命令:
composer require lotus/navmenu
包简介
A lightweight implementation of navigation menu builder for PHP
关键字:
README 文档
README
This is a package for simply creating Navigation Menu, breadcumb and sitemap in PHP, Codeigniter and Laravel 5.
Introduction
Simply use the Menu facade in the place of the Nav Menu facade when you want to generate a Navigation Menu.
Add via composer
composer require lotus/navmenu
Menu is a php class which auto build navigation menu.
First Input the menu array and navbar css class.
$type = 'user'; Menu::setMenuArray ( $navbarArray,[ 'class' => 'nav nav-bar' ], $type );
To place menu at your page, use render method at your header page.
echo Menu::render ();
Get Breadcumb
echo Menu::renderBreadcumb ();
Get Active menu array
$lavel = 0; echo Menu::getActiveMenu($lavel);
This one can generate sitemap also. site map using this class library.
Generate Sitemap in Sitemap page use,
Menu::renderSitemap( $type, 'Customer' ) ;
$menutype is either public or user.
Example menu input array
$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();" ] ] ];
统计信息
- 总下载量: 44
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-04-23