Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Possible to open a modal from the navigation menu? #8883


User avatar
0
ebenzle created

asp.net zero v8.1.0 ASP.NET MVC 5.x & jQuery

We'd like to add a navigation link that will allow users direct access to the create/edit modal for entities.

For example, an entity names 'Courses' might have a menu item like this:

AddItem(new MenuItemDefinition( AppPageNames.Common.AddCourses, L("AddCourses"), url: [open /Courses/\_CreateOrEditModal.cshtml], icon: "flaticon-presentation-1", permissionDependency: new SimplePermissionDependency(AppPermissions.Pages\_Administration\_Courses) ) )

If it's not possible to open the modal because of dependancies on the main entity page, then is it possible to open that page, then auto trigger _addCourseModal.open() once the page loads?


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @ebenzle,

    It is possible. You can just register to click event of menu items and if the URL contains a specific format (like the one you have shared), you can open a modal.