Table of Contents Previous Next

Sugar Developer Guide

Version 5.1


Chapter 4 Customizing Sugar : The Custom Directory : Shortcuts

Shortcuts
It is possible to override or create new Shortcuts menu items.
Master Directories
Files in these directories can be edited and new files can be added to these directories.
Production Directories
Files in these directories are auto-generated by the system.
Description
Shortcut menu files either replace entirely or add to the menu items available in the menus on the left-hand side of the user interface. In the Master Directories you can have many files like:
During the repair function (Admin->Repair->Quick Repair and Rebuild), all of these files will be merged together into the production directory and they become the file:
/custom/modules/Leads/ext/Menus/menu.ext.php
For example, a menu extension file for the Calls module could contain the following:
<?php
if(ACLController::checkAccess('Calls', 'import', true)) {
$module_menu[]=Array("index.php?module=Calls&action=MakeIndex",$mod_strings['LNK_INDEX_CALLS'], "Import");
}
?>
 
This would add a menu item to the Calls modules Shortcuts menu. The $module_menu array takes three elements.
If you added a $module_menu=array(); to the top of this file, you would effectively clear out any of the standard menu items. Then you could then replace them all with new definitions.
If the custom file is in the /custom/Extension/application/Ext/Menus/ directory then your menu changes will affect all shortcut menus in every module.

Table of Contents Previous Next

Copyright 2004-2008 SugarCRM Inc.
Product License