How to make frontend module editing as modal in a custom template?

by omni   Last Updated March 13, 2018 00:10 AM

In layout override files, this is successfully outputting the content of the modules plus the icon for frontend module editing. But when clicked it opens the module editor as a full page instead of as a popup modal.

<?php echo JFactory::getDocument()->loadRenderer('modules')->render("MODULEPOSITION", array('style' => 'xhtml'), null); ?>

How to show the module editing page in a popup modal?

Also hope it's ok to ask two questions on one, how to have the module edit form return to the page on which the module is edited after clicking 'save' or 'cancel'? Currently it's returning to the sites index page.

Related Questions

Is it possible to override js scripts?

Updated April 05, 2016 08:04 AM

countModules in module chrome function

Updated March 26, 2015 07:25 AM

Mod latest news to include all subcategories item

Updated June 23, 2015 07:04 AM