Rank: Advanced Member
Groups: Developers
Joined: 11/7/2018(UTC) Posts: 303
Thanks: 21 times Was thanked: 5 time(s) in 5 post(s)
|
How can I add a link to the admin menu so that the site will look for the controller under the Shipping folder? I have a new controller W2M_DeliveryDaySettingsController with ActionResult for the view of DeliveryDaySettings() I added this to the admin menu under Shipping <menuItem title="Estimated Delivery Days" controller="EstimatedDeliveryDaysSettings" action="DeliveryDaysSettings" description="Configure settings for W2M Estimated Delivery Days." />
I had to move the view out of the Shipping subfolder to the Views folder in order for the site to find it. Thanks
|
|
|
|
Rank: Advanced Member
Groups: Authorized User, Developers Joined: 5/30/2020(UTC) Posts: 125
Thanks: 14 times Was thanked: 3 time(s) in 3 post(s)
|
Where is the controller located in your directory structure, and do you have any special routing rules set up? The reason I ask is that your controller is named W2M_DeliveryDaySettingsController, but your menuItem has the controller listed as EstimatedDeliveryDaySettings instead of W2M_EstimatedDeliveryDaySettings.
Regarding the Views folder, MVC typically looks at /Areas/Admin/Views/{controller_name}/{action_name}.cshtml and /Areas/Admin/Views/Shared/{action_name}.cshtml unless you hard code the path, like return View("~/Views/Shipping/DeliveryDaySettings.cshtml", model);
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close