I am trying to hide menu items only to logged out users. I would prefer to make this into a simple plugin so I don't have to change any code. I would appreciate any help on how I can do this. Thank you!
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.
- Team Webgalli@webgalli
Team Webgalli - 0 likes
- Create a new plugin
- Unregister the menu's
- Register them again with in a login wrapper
- If you are familiar with plugin hooks, there are other options too
- Juho Jaakkola@juho.jaakkola
Juho Jaakkola - 0 likes
- Les@lesbak
Les - 0 likes
- Frank Barcellona@fbarcellona
Frank Barcellona - 0 likes
You must log in to post replies.Very good decision on not touching the core and to make the developments as a plugin.
Start with http://docs.elgg.org/ & http://reference.elgg.org
Here's more detailed documentation on the plugin hooks: http://docs.elgg.org/master/en/design/events.html#plugin-hooks
The menu hook names take the form "register", "menu:<menu name>".
for example:
Then inside the my_plugin_site_menu_setup() function you can add or remove menu items depending on the result of elgg_is_logged_in().
Did you try to use Jeroen Dalsem's Menu Builder? It works great for me with Elgg 1.8.16.
Thanks so much for all of the information. That was a huge help for me. I will also check out the Menu Builder plugin too!