I want a Dashboard menu item. I created a simple module to add the link but I would like it to be the first item. How is order determined?
—steve
I want a Dashboard menu item. I created a simple module to add the link but I would like it to be the first item. How is order determined?
—steve
Solved this by adding “order” to addMenuItem object. Then in the app.php layout I use this to sort. I hate hacking into these files but it was the only solution I could find. Now if I could make Dashbord menu item active on first load…
Without a Dashboard menu item there is no logical way to return from the other modules!
check this post for other solutions
Appreciated. The problem is that it sorts by LABEL and that may not be the order needed. I added an ORDER parameter to use for sorting.
$this->helper(“admin”)->addMenuItem(“modules”, [
“label” => “Dashboard”,
“icon” => “dashboard:icon.svg”,
“route” => “/cockpit/dashboard”,
“active” => $active,
“order” => 0,
]);