HOWTO: Add a new item to the Shortcut Bar

sugarcrmdevelopers —  May 31, 2011 — 2 Comments

Extending the Shortcut Bar is actually  a really easy customization that can be a huge convenience.

In the following example, we’ll add a button than opens a Google search window that searches for the name of the current record.

In the code base, the Shortcut Bar is referred to as the Dashlet Container Menu Bar. We will start by defining a new Extension that will add a new dynamic menu item to the DCMenu Bar. The file should be created in custom/Extension/application/Ext/DashletContainer/Containers/googleMenuItem.php with the following contents:

After adding the above extension, a quick repair will add the new button to the Shortcut Bar. However, in order to get Google to show, we will need to add the custom action used by the menu item. Adding the contents below to a custom php file called showGoogle.php in the custom/modules/Home directory will do the trick.

This certainly isn’t a production ready feature, but it should get you started on your own menu items.

2 responses to HOWTO: Add a new item to the Shortcut Bar


    Great tips to users ,thanks for sharing,nice post.web hosting review


    This works, but custom/Extension/application/Ext/DashletContainer/Containers/filename gets overwritten on a repair/rebuild. Is there any other way to do this that won’t keep getting overwritten?

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