how can i remove the friends icon in the topbar, i have it implied in my theme nice and the icon just makes things redundent
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Brett@brett.profitt
Brett - 0 likes
- ihayredinov@ihayredinov
ihayredinov - 0 likes
- Brett@brett.profitt
Brett - 0 likes
You must log in to post replies.You need to hook into the register, menu:topbar hook and remove the item with the name "friends."
Your callback would like something like this: https://gist.github.com/1888009
FYI: I found this information by checking the HTML. All menus in Elgg have classes that let you guess the menu names. If you look at the menu item's <li> tag you'll see the class "elgg-menu-item-messages". Look up the DOM to the <ul> tag and you'll see the class "elgg-menu elgg-menu-topbar elgg-menu-topbar-default".
These classes mean you're looking at the menu item named "friends" in the "default" section of the menu named "topbar".
Brett, wouldn't it be wonderful to have another hook before 'register' in the factory, which would allow to use register/unregister api, without having to iterate through the return array on 'register' to find the menu in question?
@Ismayil - I actually forgot about the unregister function. In this case you CAN use it because the friends menu item is registered by core. So you can replace the hook with elgg_unregister_menu_item('topbar', 'friends'). That's much simpler :)