Dear All.
I created a item menu by use AdminMenu.cs, now i want add a item menu (child menu) into item menu i created (parent menu). So how do i do? Thanks you.
Geschrieben: 08 February 2017 - 05:34
Dear All.
I created a item menu by use AdminMenu.cs, now i want add a item menu (child menu) into item menu i created (parent menu). So how do i do? Thanks you.
Geschrieben: 17 February 2017 - 06:05
Please see this commit.
Hi Admin. I add other new controller. I register router in Router Provider.cs
routes.MapRoute("SmartStore.GarageDashboard", "Plugins/SmartStore.GaragePlugins/{controller}/{action}", new { controller = "Garage", action = "Dashboard" }, new[] { "SmartStore.Garage.Controllers" } ) .DataTokens["area"] = "SmartStore.Garage";
In AdminMenu.cs i use
var childmenuItem1 = new MenuItem().ToBuilder() .Text("Dashboard") .ResKey("Plugins.FriendlyName.Garage") .Action("Dashboard","GaragePlugins") .ToItem();
But while run, it not found my View (Dashboard.cshtml) in path ~\Presentation\SmartStore.Web\Plugins\SmartStore.Garage\Views\GaragePlugins\Dashboard.cshtml
It show error:
The view 'Dashboard' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Plugins/Admin/Views/GaragePlugins/Dashboard.cshtml
~/Plugins/Admin/Views/Shared/Dashboard.cshtml
~/Themes/Alpha/Views/GaragePlugins/Dashboard.cshtml
~/Views/GaragePlugins/Dashboard.cshtml
~/Themes/Alpha/Views/Shared/Dashboard.cshtml
~/Views/Shared/Dashboard.cshtml
Please help me. Thanks!
Geschrieben: 17 February 2017 - 11:02
.Action("Dashboard","GaragePlugins", new { area = "SmartStore.Garage" })
Marcus Gesing
Smartstore AG
Geschrieben: 17 February 2017 - 17:16
Please try.Action("Dashboard","GaragePlugins", new { area = "SmartStore.Garage" })
It not working. Still not found the View.
Geschrieben: 17 February 2017 - 19:47
What is the name of the controller? Properties of the view should be set to:
Marcus Gesing
Smartstore AG
Geschrieben: 17 February 2017 - 21:19
Oh i'm so sorry. i rebuild solution but i forget clear cache in my browser so it still has error. Now i can run it. Thanks for your enthusiastic help.