Results 1 to 4 of 4

Thread: Remove shortcut links in 6.1

  1. #1
    itx's Avatar
    itx
    itx is offline Sugar Community Member
    Join Date
    Dec 2008
    Location
    Montréal, Qc
    Posts
    25

    Default Remove shortcut links in 6.1

    Hi,

    I'd like to remove the shortcut links that appear in the sidebar when you click on a module.

    For example, when you click on "Contacts", you see shortcut links like "Create a contact", "Create a contact from a Vcard", etc ...

    I've tried following this thread, but it doesn't seem to work with 6.1:
    http://www.sugarcrm.com/forums/showt...578#post195692

    How would it be possible to do so on Sugar 6.1, with the ModernAqua theme ?

    Thanks !
    Last edited by itx; 2011-02-03 at 09:36 PM. Reason: typos
    SugarCRM CE 6.1
    Operating system Linux
    Linux2.6.32-25-generic x86_64
    Apache/2.2.14 (Ubuntu)
    PHP Version 5.3.2
    MySQL client version: 5.1.41

    Programmation SugarCRM, Wordpress, Joomla à Montréal

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Remove shortcut links in 6.1

    This can be accomplished through extended menus: custom/Extension/modules/Contacts/Ext/Menus/menu.ext.php

    You can unset the menu items. Take a look at modules/Contacts/Menu.php to identify what menu items you want to remove.

    Then go to Admin -> Repair -> Quick Repair and Rebuild

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  3. #3
    itx's Avatar
    itx
    itx is offline Sugar Community Member
    Join Date
    Dec 2008
    Location
    Montréal, Qc
    Posts
    25

    Default Re: Remove shortcut links in 6.1

    Hi André,

    Thanks for your quick reply!

    I've created the file menu.ext.php in the folder custom/Extension/modules/Contacts/Ext/Menus/, then I added the follwing :

    foreach($module_menu as $key => $menus_defs){

    if($menus_defs[1] == 'Create Contact From vCard'){
    unset($module_menu[$key]);
    }

    }

    I did a Quick Repair and it didn't work. I even tried doing :

    foreach($module_menu as $key => $menus_defs){

    if($menus_defs[2] == 'Create Contact From vCard'){
    unset($module_menu[$key]);
    }

    }

    or

    foreach($module_menu as $key => $menus_defs){

    if($menus_defs[1] == 'Créer un contact à partir d\'une Vcard'){
    unset($module_menu[$key]);
    }

    }

    or

    foreach($module_menu as $key => $menus_defs){

    if($menus_defs[2] == 'Créer un contact à partir d\'une Vcard'){
    unset($module_menu[$key]);
    }

    }

    because my SugarCRM 6.1 is in French, but still to no avail.

    Can you spot something I'm doing wrong ?

    Thanks!
    Last edited by itx; 2011-02-04 at 03:48 PM.
    SugarCRM CE 6.1
    Operating system Linux
    Linux2.6.32-25-generic x86_64
    Apache/2.2.14 (Ubuntu)
    PHP Version 5.3.2
    MySQL client version: 5.1.41

    Programmation SugarCRM, Wordpress, Joomla à Montréal

  4. #4
    Editha is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    58

    Default Re: Remove shortcut links in 6.1

    I tried to unset menu items in Version 6.1.0

    If the file custom/modules/<module>/Ext/Menus/menu.ext.php is required, the variable '$module_menu' is an empty array.
    Check it out in file include/MVC/View/SugarView.php in function getMenu().

    At this time the definitions from modules/<module>/Menu.php are in the array $final_module_menu.

    My working code in menu.ext.php is like this:

    foreach ($final_module_menu as $key => $val)
    {
    if($val[2] == 'AccountReports')
    unset($final_module_menu[$key]);
    }

    The Problem is, that the file menu.ext.php can be deleted or overwritten by the installation of a new module with the ModuleLoader. It is better, to create the file custom/Extension/modules/<module/Ext/Menus/menu.php with the content I wrote to initiate Sugar to create the file menu.ext.php with QuickRepair&Rebuild.

    If you want to select the array element by the label text in a multi language environment like:
    if($menus_defs[1] == 'Create Contact From vCard'){
    you shoud use the label itself. In my example above it would be:
    if($val[1] == $mod_strings['LNK_ACCOUNT_REPORTS'])
    Last edited by Editha; 2011-03-21 at 11:52 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Remove shortcut entries
    By muscariello in forum Help
    Replies: 6
    Last Post: 2010-03-04, 10:05 AM
  2. Remove Shortcut bar & quickcreate form
    By vishwasrao in forum Developer Help
    Replies: 3
    Last Post: 2009-02-18, 05:52 PM
  3. Remove Shortcut sub-panel
    By paras in forum General Discussion
    Replies: 2
    Last Post: 2008-02-18, 04:36 AM
  4. Remove Shortcut Windows
    By mcs/om in forum Help
    Replies: 2
    Last Post: 2006-04-26, 12:41 AM
  5. Help with Some Shortcut Links
    By mody1983 in forum Help
    Replies: 1
    Last Post: 2006-03-09, 02:26 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •