I’m trying to develop a custom popup view for a custom module
stumbled upon a solution and thought I would share it.
first, you have to make sure that the base module folder has a controller in my case since I was using a custom module, I had to add a controller to
my base module folder modules//controller.php the controller can be empty in the base module folder since you will be using the
custom module to override it.
class <module>Controller extends SugarController
{
}
Add the controller in custom/modules//controller.php make sure your custom controller has the following naming convention
and make sure it inherits the base module controller
class Custom<module>Controller extends <module>Controller
{
public function action_Popup()
{
$this->view = 'Popup';
}
}
Now we need to add the view that we call in our custom controller in custom//views/ add view.popup.php
make sure you inherit from SugarView and you can customize what you want displaying in your popup through
editing the display function
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
class Custom<module>ViewPopup extends SugarView
{
public function display()
{
echo 'output';
}
}