If you look at menus.client.services.js
in the core
mean.js module, the last line will look like this: this.addMenu('topbar');
. If you change it to this.addMenu('topbar', true);
. You will see all the menu items displayed on the top panel when you are not logged in. Then you can add your menu item, as in your example, or without true
, since it inherits it from the parameter that has just been changed:
Menus.addMenuItem('topbar', 'Talks', 'talks', 'dropdown', '/talks(/create)?'); OR Menus.addMenuItem('topbar', 'Talks', 'talks', 'dropdown', '/talks(/create)?', true);
Or, as shown below, if you want it to hide when not signed:
Menus.addMenuItem('topbar', 'Talks', 'talks', 'dropdown', '/talks(/create)?', false);
Hope this helps.
source share