$(function () {
$('li[data-request]').on('click', function (e) {
e.preventDefault(); // Prevent default click behavior
var requestHandler = $(this).attr('data-request'); // Get the request handler name
// Trigger an AJAX request using OctoberCMS framework
$(this).request(requestHandler);
});
});
This is a functional example that you can adapt as needed. If necessary, you can also override the modules\backend\layouts\_submenu_items.php partial.
Hi @apinard
thanks for the suggestion.
Sounds like it is worth trying it out.
Would there be a way to get an existing controller context so I can just reuse the ajax Handler and the context (formModel etc, …) as I want show a popup with a formWidget.