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!
-
KINAMU Typeform Integration
FEATUREDSeamlessly and simply engage with prospects and customers using Typeform for Sugar, leading to more responses, higher completion rates, and accelerated growth.
-
Microsoft GP Integration - SYNC by Commercient
FEATUREDYour ERP Accounting data is integrated with your SugarCRM when you use Commercient’s SYNC app. SYNC Accounts, Contacts, Invoices, Sales Orders, Products, Pricing, Inventory, and more!
-
Ringover
FEATUREDConnect Sugar with Ringover to synchronise all your call data and make unlimited international calls with ease, saving you time and boosting your team’s productivity so they can do more selling and ...
- Show more addons