SugarCRM Developers on Twitter

HOWTO: Hide an out of the box module

What is the upgrade-safe way of removing an out-of-the-box module from the main menu?

I’ve been able to remove modules by uncommenting the respective $moduleList[] list from /include/modules.php, but as far as I know, that isn’t upgrade-safe.

I was considering putting a custom file somewhere (/custom/Extension/application/Ext/include/ ?) that goes through the values in $moduleList[] and when it comes across the modules I want to remove I use the unset function on the particular array index. Perhaps this is the only way of doing it?

Thanks.

This is one area where digging into the source code isn’t required, as you can handle this right inside of Sugar itself. Just go to the Admin section, and go to the ‘Display Module Tabs and Subpanels’ page, and move the module you want to hide over to the ‘Hidden’ area as you can see the screenshot below:

Once you move the modules you wish to the ‘Hidden’ area and click ‘Save’, the module will be not displayed anywhere in the UI, but you can get to them if you specify the module in the URL.

Looking into the Sugar 7.1.0 at demo.sugarondemand.com, you can still search the hidden modules, as their checkboxes appear in the drop-down search menu, providing a way for even the no-tech-savvy user to get into the module you’re trying to disable.

I get that you can disable it in the admin/search, but would be great to have a way to completely disable the module, including direct URL access…