Add extra menu to navigation menu Navbar
Collapse
X
-
In v8.4 it will be possible to define menu items through metadata: https://github.com/espocrm/espocrm/issues/3080 -
Ok guys, to remove the "preferences" menu from the top right menu just follow the info bellow from the above link of the forum.
1 - Create App.json under custom\Espo\Custom\Resources\metadata\clientDefs
{
"navbarView": "custom:views/site/navbar"
}
2 - Create the new custom view navbar.js under client\custom\src\views\site
define('custom:views/site/navbar', ['views/site/navbar'], function (Dep) {
return Dep.extend({
getMenuDataList: function () {
var list = Dep.prototype.getMenuDataList.call(this);
if (!this.getUser().isAdmin()) {
list = list.filter(item => item.link !== '#Preferences');
}
return list;
},
});
});
Thanks to rabii
Leave a comment:
-
I think to remove some menu options maybe this post can help:
issue we are having is that we rely on CRM notification both in App and email notification to keep our users informed, however we have noticed that some of our users were not engaged and when we checked we found that they have disabled the notifications on the CRM and hence they don't receive any further notifications. is thereLeave a comment:
-
Thanks eymen-elkum, it's working just perfectly!!!
And if i want to remove an existing menu? for example, the "Preferences" option?
Nuno -
Hi,
Here's how to do:
- Create a file custom/Espo/Custom/Resources/metadata/clientDefs/App.json
- Create custom navbar js file: client/custom/src/views/site/navbar.jsCode:{ "navbarView": "custom:views/site/navbar" }
Code:define('custom:views/site/navbar', ['views/site/navbar'], function (Dep) { return Dep.extend({ getMenuDataList: function () { const menuDataList = Dep.prototype.getMenuDataList.call(this); menuDataList.push({ action: 'myCustomAction', link: '#MyCustomLink', label: this.getLanguage().translate('My Custom Action'), }); return menuDataList; } }); }); Leave a comment:
-
Add extra menu to navigation menu Navbar
Hi everyone,
I am trying to add a new menu entry on the client navigation menu (client navbar i think, where you have the preferences, last viewed, logout options) top right menu, but with no luck, i edit the navbar.js where that information is and insert the new menu line but changes don't seem to be acepted / updated.
I am editing the right file? not sure
EspoCRM version 8.1.1
Thanks for all your help
Nuno1 PhotoLast edited by nunos; 05-18-2024, 09:50 PM.Tags: None
Leave a comment: