Customising a modules' subpanels on mobile

Is there a way to customise which subpanels appear for a module on the mobile site? I would like to remove some of the subpanels without removing the relationships.

  • Hello Steven Osborne

    It is possible to remove subpanel from any module on mobile website. For example, to remove subpanel from Contacts module:

    Copy subpanels.php 

    from

    modules/Contacts/clients/mobile/layouts/subpanels/subpanels.php

    to  

    custom/modules/Contacts/clients/mobile/layouts/subpanels/subpanels.php

    and removes or comment out the arrays from the custom file. For example, if you wanted to get rid of the Calls subpanel, you would comment out or remove

    array(
        'layout' => 'subpanel',
        'label' => 'LBL_CALLS_SUBPANEL_TITLE',
        'linkable' => false,
        'context' => array(
            'link' => 'calls',
        ),
    ),

    Make sure to go to Admin > Repair > Quick Repair and Rebuild before testing for changes.

  • This only works for the mobile view from within a mobile browser right? Would this change also take effect in the native Sugar app?

  • This works in the Sugar app as well.

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Hi Andre,

    I tried below steps to remove meeting subpanel on accounts in mobile app:

    Copy subpanels.php 

    from

    modules/Accounts/clients/mobile/layouts/subpanels/subpanels.php

    to  

    custom/modules/Accounts/clients/mobile/layouts/subpanels/subpanels.php

    $viewdefs['Accounts']['mobile']['layout']['subpanels'] = array(
    'components' => [
    [
    'layout' => 'subpanel',
    'label' => 'LBL_CALLS_SUBPANEL_TITLE',
    'context' => [
    'link' => 'calls',
    ],
    ],
    [
    'layout' => 'subpanel',
    'label' => 'LBL_MEETINGS_SUBPANEL_TITLE',
    'context' => [
    'link' => 'meetings',
    ],
    ],
    and removed meeting array from above and  Admin > Repair > Quick Repair and Rebuild but its not working from still meeting subpanel is showing in Accounts in mobile app.
    Can you please suggest?
    Kindest Regards,
    Shreya