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.