Navigation
Navigation
1. Components and BackEnd Versions
You can change or customize the left side navigation very easily.
How to add new menu items/change menu items?
In order to add, change or remove menu items from the
left side navigation, simply edit in file
/src/Layouts/LayoutMenuData.tsx
.
How to add Menu Title?
Add Menu label and isHeader property pass in the JSON object.
{
label: "Menu",
isHeader: true,
}
How to add Single Menu Item ?
Add Menu id, label, icon, link and click function(for collapse menu) property pass in the JSON object.
{
id: "calendar",
label: "Calendar",
icon: "bi bi-calendar-week",
link: "/calendar",
}
How to add Nested Menu Item ?
Add Menu id, label, icon, link, stateVariables, click function(for collapse menu) and ismainMenu property pass in the JSON object.
{
id: "products",
label: "Products",
icon: "bi bi-box-seam",
link: "/#",
click: function (e: any) {
e.preventDefault();
setIsEcommerce(!isEcommerce);
setIscurrentState('Ecommerce');
updateIconSidebar(e);
},
stateVariables: isEcommerce,
subItems: [
{
id: "listview",
label: "List View",
link: "/products-list",
parentId: "products",
},
{
id: "gridview",
label: "Grid View",
link: "/products-grid",
parentId: "products",
},
{
id: "overview",
label: "Overview",
link: "/product-overview",
parentId: "products",
},
{
id: "createproduct",
label: "Create Product",
link: "/product-create",
parentId: "products",
},
{
id: "categories",
label: "Categories",
link: "/categories",
parentId: "products",
},
{
id: "subcategories",
label: "Sub Categories",
link: "/sub-categories",
parentId: "products",
},
],
}