Hi!
How do I remove the top bar and the elgg menu in elgg 1.8?
Do I use elgg_unregister or elgg_unextend and how?
Thanks!
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.
- DhrupDeScoop@Dhrup2000
DhrupDeScoop - 0 likes
- Brett@brett.profitt
Brett - 0 likes
- DhrupDeScoop@Dhrup2000
DhrupDeScoop - 0 likes
- rjcalifornia@rjcalifornia
rjcalifornia - 0 likes
- DhrupDeScoop@Dhrup2000
DhrupDeScoop - 0 likes
- rjcalifornia@rjcalifornia
rjcalifornia - 0 likes
- Brett@brett.profitt
Brett - 0 likes
- Override the view that calls elgg_view_menu() and remove the call. In this case it's page/elements/header.
- Override the menu's specific view with an empty view. Each menu looks for a view navigation/menu/$menu_name. In this case it's navigation/menu/site.
- Hook into the prepare, menu:<menu_name> hook and remove all the items (i.e., return an empty array). Would look like elgg_register_plugin_hook_handler('prepare', 'menu:site', 'your_callback_function');
- rjcalifornia@rjcalifornia
rjcalifornia - 0 likes
- This Script Lover@elgglover
This Script Lover - 0 likes
- SUNEL@sunel_tr
SUNEL - 0 likes
You must log in to post replies.elgg_unregister_menu_item('topbar', 'elgg_logo');
The easiest way is to override the page/elements/topbar view with an empty view.
he's right ;-) no code needed !;-oO;X
mi buen amigo como esto aquí LOLZ ;-P =>
ELGG := Elgg1830_BASE/views/default/page/elements/topbar.php
PLUGIN := Elgg1830_BASE/mod/PLUGIN/views/default/page/elements/topbar.php
--> empty view ;-o
@Brett @Dhrup Oh Thanks!!
Now, what about the other menu? I also want to remove it. Do I do an empty view too?
this empty view 'removes' the top bar ;-)
what 'other menu' ?
The one below the top bar, where the 'Activity' Link is
That's the site menu. Every menu in 1.8 is printed with elgg_view_menu($menu_name). To find where menus are printed, look for elgg_view_menu calls. For this one, look for elgg_view_menu('site').
A few ways to do this:
@Brett Great! Many thanks!!!!!
Great topic.
My question is is there a way to unregister only right side of the topbar menu (with admin and setting links) ?
On same note is there a way to display only right or left menu somewhere else? (one is elgg-menu-default and other elgg-menu-alt) ?
One more thing, I've been reading http://docs.elgg.org/wiki/Menus on menus but when creating/registering new menu how and where to specify the class (default or alt, left ot right)?
For testing I have this code to register new menus:
and to display:
That works but both menus are assigned "default" class. How to specify the "alt" class?
Thanks for your help.