Last active
August 29, 2015 14:21
-
-
Save dmulvi/d2af74f2a5df36639499 to your computer and use it in GitHub Desktop.
Add a Menu Item and Custom Layout to Sugar 7 Nav Dropdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// place this file in custom/Extension/modules/Contacts/Ext/Language | |
$mod_strings['LNK_NEW_LAYOUT_LINK'] = 'New Layout Link'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This file is located custom/modules/MODULE_NAME/clients/base/views/new-layout-link/ directory | |
Put all your view js here. You can also add .hbs file to the same directory for layout | |
*/ | |
({ | |
className: 'centered-pane', | |
events: { | |
'click #someButton': 'someButtonAction', | |
}, | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// this file should be named whatever you used in the route of the menu array | |
// it should be located in custom/modules/MODULE_NAME/clients/base/layouts/new-layout-link/ directory | |
$viewdefs['Contacts']['base']['layout']['new-layout-link'] = array( | |
'type' => 'simple', | |
'components' => | |
array( | |
array( | |
'view' => 'new-layout-link', | |
), | |
), | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* place this file in: custom/Extension/modules/Contacts/Ext/clients/base/menus/header/ | |
* directory and Quick Repair & Rebuild | |
*/ | |
$viewdefs['Contacts']['base']['menu']['header'][] = array( | |
'route' => '#Contacts/layout/new-layout-link', | |
'label' => 'LNK_NEW_LAYOUT_LINK', | |
'acl_module' => 'Contacts', | |
'icon' => 'icon-search', | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment