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)
-
0
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.