Whether you’re making your own module, an integration or just a special something-something for your company’s SugarCRM instance, there comes a time when you may want to create a nice page to hold some administrative configuration settings. The best place to put these types of things is on the “Admin” area of Sugar.
The $admin_group_header variable is the array that holds the metadata that determines what the layout of the admin page looks like. To add new links to the admin page, all you need to do is alter the array accordingly in a custom Ext file. To test this out, create a file named abc_Module.php in the following directory: /custom/Extension/modules/Administration/Ext/Administration/ If the directory path does not exist, simply create the folders needed.
Copy and paste the code below into the new file and save. Now, go to SugarCRM and run a “Quick Repair and Rebuild”. This will merge the existing admin options with the new admin options we’ve created.
To see exactly what the code is doing, see the comments in the code.
If you installed this on your system as is, you’ll notice the title and description to “Link 2” show up as a language file label name. Because the scope of the page is within the Administration module, you’ll need to add the labels to the Administration module’s language files. You can do this by creating another extension file named en_us.abc_Module.php (using your language prefix of choice) in the /custom/Extension/modules/Administration/Ext/Language folder. The code should look something like the following (Notice the label names match up to the previous code):
Like before, after running a “Quick Repair and Rebuild”, the changes will be applied, and the labels from the new language file will be pulled onto the admin options page.
To dig deeper into how SugarCRM uses the $admin_group_header array to process the admin page you’ll want to start here: /modules/Administration/index.php. Look for a line that contains “foreach ($admin_group_header as $key=>$values)”. This is where the code begins to loop through the array and build the page.
It’s that simple. Is this how you would have solved the problem? If you have any related tips on this same topic, let everyone know in the comments!
Sugar Plugin that bridges the gap between Twilio & Sugar. To establish a connection with your customers, a state-of-the-art Telephony solution for Voice (Inbound and Outbound) and SMS to run your business more efficiently and cost-effectively. Works great with both VoIP and landlines.
Xero Accounting Integration
Xero Accounting Integration is the undisputed master in accounting software, giving you the power to create smart accounting from just about anywhere in the world. SuiteCRM is a revolutionary CRM offering the latest tools to enhance your business around customer-centricity.
SugarCRM Outlook Plugin for Mac
Implicit FrontEnd for Mac is an Outlook integration solution for SugarCRM which enables users to do all their CRM work from within Outlook. Use Email side-panel in Outlook to view CRM information, update or create new CRM records and archive email to any CRM record.
- Show more addons