Clearing Some Basics
Some basics needs to be cleared out before you work on/with this package.
- It Creates Bootstarp Supported menus.
- Dynamic Drop Down Menus can be created using it.
- Database Table
menus
:ID
The unique identifier.parent_id
It will be defined if a sub-menu is created.ID
of the parent menu item will be the value here.name
Name to display.order_by
Comes handy when creating multiple menu items of same hierarchy level.link
Value supplied to the<a href="">
of the menu item.link_attr
Any extra Attributes of the Link. Liketarget="_blank"
.icon
Icon Class Code supplied to the<i class="">
. If using font-awesome, use full class code that is to be provided in<i>
, likefa fa-code
.type
It is used to distinguish multiple menus. For example there is a Main nav menu and Sidebar Nav Menu. So different names can be alloted to both.auth
Authentication Level can be defined here. Here1=Authenticated Users Only, 2=Unauthenticated Users Only, 0=Both User Groups
Displaying the Menu
The menu can be displayed by using the following function:
1 | Dropmenu::display($type);
|
The $type
is the value provided in the type
column in the database table. For Example: main:nav or sidebar or sidebar:nav or main:foot, etc.