HOWTO: Modify the global control links

sugarcrmdevelopers —  March 17, 2011 — 8 Comments

For everyone using Sugar 6 Enterprise or Professional Edition, you’ll notice a bar on your screen like this:

If you using the Community Edition or the Classic theme, it looks like this instead:

What this is called is the “global control links”. It is basically a collection of links that appear on every page in the header of your Sugar instance, providing links to the several areas of the application and any other outside websites. You can customize this very easily to add in your own links to appear here as well by adding them to the custom/include/globalControlLinks.php file. For example, to add a link to the Google homepage, you could add this in there:

You can also remove links from displaying the as well. You’ll need to checkout the include/globalControlLinks.php file to see what the correct id is to remove, but it’s as simple as unseting the array key.

You can’t however remove the “Welcome, <username>” or “Logout” links thru this mechanism, since these are part of the header by default.

8 responses to HOWTO: Modify the global control links


    Nice post, John.
    But, in those customization cases, I try to see things from a developer’s perspective.

    Let’s say that Fabio builds module “A”, adding the file /custom/include/GlobalControlLink.php in its package.
    Then, John builds module “B”, adding its own GlobalControlLink.php file.
    Fabio and John works in two different softwarehouses, they don’t know each other.

    Customer “x”, takes the above mentioned packages, and install them… Which GlobalControlLink he will use ?

    The same logic applies to Scheduled Jobs : the custom/modules/Schedulers/_AddJobsHere.php file, is unque….

    Which would be, then, the best approach to the problem ? Merging files in the execute scripts during installation packages ? Or there’s something I’m missing ?



    There’s more.
    With GCL, one’s can also define subitems. The main added voice, then, would have a small symbol “>>”, and the main link itself would open a submenu.

    This is the way:

    $global_control_links[‘mysites’] = array(‘linkinfo’ => array(‘MySites’ => ‘javascript:void();’),
                                             ‘submenu’ => array(“MySite#1” => array(“My Site #1” => “”),
                                                                “MySite#2” => array(“My Site #2” => “”)

    (I guess it won’t be perfectly formatted, since it’s a comment… put a bit of fantasy….)



    How can we amend the from being able to change their usersettings i.e. remove the link


    This will create a link at the end i.e. after About. Can we manage or change the default ordering of the links ?

Trackbacks and Pingbacks:

  1. How do I move my global menu item over to Sugar 7? « SugarCRM Developer Blog - November 8, 2013

    […] can we transition from how you used to do it to how you do it now?”. Looking back at an earlier article on this, we saw to add an item to this menu with ease by adding them to the […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s