Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Can I remove un wanted sub panels on core modules?

  1. #1
    RobinBonin is offline Sugar Community Member
    Join Date
    Jan 2008
    Posts
    12

    Default Can I remove un wanted sub panels on core modules?

    There are a few sub panels on the contact pages and projects that we are not using.
    is it possible to remove them?

    I went into the studio and I could change the columns, and remove all the columns but the panel still shows up in there.

  2. #2
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: Can I remove un wanted sub panels on core modules?

    Yes, it is possible to do it.

    One way would be to remove access to the module that corresponds with the sub panel in question. That should automatically remove the subpanel from view.

    Secondly, you can comment out the corresponding sections of code from within the <sugar>/modules/Project/metadata/subpaneldefs.php. There might be a way to do this in an upgrade safe manner in 5.0, but I am not sure.

    If you are on a pre-5.0 release, the second approach would require a code modification, but the file you'd want to modify is <sugar>/modules/Project/layout_defs.php
    Regards,

    Angel Magaña
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  3. #3
    RobinBonin is offline Sugar Community Member
    Join Date
    Jan 2008
    Posts
    12

    Default Re: Can I remove un wanted sub panels on core modules?

    Thank you for your response. I am using version 5.

    I have commented out the bugs for the project tab as a test in the subpaneldefs.php file.

    PHP Notice: Undefined index: module in C:\[SUGARPATH]\include\SubPanel\SubPanelDefinitions.php on line 86 PHP Notice: Undefined index: subpanel_name in C:\[SUGARPATH]\include\SubPanel\SubPanelDefinitions.php on line 86 PHP Warning: aSubPanel::require(modules//metadata/subpanels/.php) [function.aSubPanel-require]: failed to open stream: No such file or directory in C:\[SUGARPATH]\include\SubPanel\SubPanelDefinitions.php on line 87 PHP Fatal error: aSubPanel::require() [function.require]: Failed opening required 'modules//metadata/subpanels/.php' (include_path='C:\[SUGARPATH]\include/..;.;C:\php5\pear') in C:\[SUGARPATH]\include\SubPanel\SubPanelDefinitions.php on line 87
    I did a search for bugs under the project folder, and I see there are also entries in a vardefs.php file, and also in the language file.

    It looks to me that the array length is stored or cached somewhere. Any thoughts?

  4. #4
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: Can I remove un wanted sub panels on core modules?

    I think you inadvertently commented out something you shouldn't have. I don't see the same problem.

    I've attached my subpaneldefs.php so you can check it out. Search for my name to see where I edited it.
    Attached Files Attached Files
    Regards,

    Angel Magaña
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  5. #5
    johnnyo2 is offline Member
    Join Date
    Apr 2006
    Posts
    6

    Default Re: Can I remove un wanted sub panels on core modules?

    Does anyone know how to do this in 5.0 - upgrade safe.
    There is not a file named subpanelsdefs in custom/ working/ modules. It seems to me that this change must be made in custom/working modules to be upgrade safe.
    Anyone???
    Thanks

  6. #6
    RobinBonin is offline Sugar Community Member
    Join Date
    Jan 2008
    Posts
    12

    Default Re: Can I remove un wanted sub panels on core modules?

    Angel, thank you for your replies.

    Attached is the section of code with the comment.

    Code:
                'get_subpanel_data' => 'cases',
                'add_subpanel_data' => 'case_id',
                'title_key' => 'LBL_CASES_SUBPANEL_TITLE',
            ),  /*
            'bugs' => array(
                'top_buttons' => array(
                    array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Bugs'),
                 ),
                'order' => 110,
                'module' => 'Bugs',
               'sort_order' => 'desc',
               'sort_by' => 'bug_number',
               'subpanel_name' => 'default',
               'get_subpanel_data' => 'bugs',
               'add_subpanel_data' => 'bug_id',
               'title_key' => 'LBL_BUGS_SUBPANEL_TITLE',
            ),   */    
            'products' => array(
                'top_buttons' => array(
                    array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Products'),
                 ),
    If I remove the comments it is fine, as soon as I add them I get the error in my other post. It must be something in the version that I am using? (Version 5.0.0a (Build 3120))

    I will try to update to the latest build and see if that works.

  7. #7
    dpatech is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    NC
    Posts
    287

    Default Re: Can I remove un wanted sub panels on core modules?

    Check out the post by André Lopes of Lampada in this thread - they show you how to do this in an upgrade-safe manner.

    http://www.sugarcrm.com/forums/showthread.php?t=27893
    - Sugar Team
    dpa Technology LLC
    e-mail: dpaDeveloper@dpatechnology.com
    web: http://www.dpatechnology.com

  8. #8
    RobinBonin is offline Sugar Community Member
    Join Date
    Jan 2008
    Posts
    12

    Default Re: Can I remove un wanted sub panels on core modules?

    With a clean install of sugar 5.0b it works.
    Either it was a bug that was fixed, or reading the other post, it may have been a problem with the user preference.

    thanks for your time.

  9. #9
    johnnyo is offline Sugar Community Member
    Join Date
    Feb 2006
    Posts
    31

    Default Re: Can I remove un wanted sub panels on core modules?

    I used this code: on 5.0.

    It works great!
    Thanks dpatech and André Lopes

    <?php
    unset($layout_defs['Accounts']['subpanel_setup']['leads']);
    ?>

    The only subpanel I wanted to remove and couldnt do was Direct Reports. Anyone know the code for this:
    Thanks very much

  10. #10
    RobinBonin is offline Sugar Community Member
    Join Date
    Jan 2008
    Posts
    12

    Default Re: Can I remove un wanted sub panels on core modules?

    Quote Originally Posted by johnnyo
    I used this code: on 5.0.

    It works great!
    Thanks dpatech and André Lopes

    <?php
    unset($layout_defs['Accounts']['subpanel_setup']['leads']);
    ?>

    The only subpanel I wanted to remove and couldnt do was Direct Reports. Anyone know the code for this:
    Thanks very much
    Just to clarify, where did you put that code? what file?

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. soap: remove a single relationship
    By thierry.beeckmans in forum Developer Help
    Replies: 6
    Last Post: 2009-07-01, 08:42 PM
  2. HOWTO - Enhance ModuleBuilder generated modules to include AJAX
    By kenneth.thorman in forum Developer Tutorials
    Replies: 10
    Last Post: 2009-01-16, 05:53 PM
  3. Removing core modules
    By peterfreeth in forum Help
    Replies: 6
    Last Post: 2008-11-21, 07:01 AM
  4. cannot install or remove modules
    By sakeenahb in forum Help
    Replies: 5
    Last Post: 2008-01-10, 08:14 PM

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
  •