In many panel applications we need menus that can be accessed continuously such as sidebar or topbar.
In the Kirby panel we can only add the link to the plugin page to the topbar.
We need special menus to get to the pages we use very often.
I’ve seen some customers get lost between pages and edit the wrong pages.
Here’s an example to better explain:
index.js
panel.plugin("yourname/newmenu", {
menu: {
newmenu: {
label: "Shop",
icon: "cart",
component: {
options: {
{
headline: "Catalog"
},
{
icon: "angle-right",
label: "Products",
page: site.find("products")
},
{
icon: "angle-right",
label: "Orders",
page: site.find("orders")
},
{
seperator: true
},
{
icon: "angle-right",
label: "Report",
page: site.find("report")
}
}
}
}
}
});
Not as topbar, but in the new sidebar