Hi everyone I need to create a user sub menu based on existing 'Account' elgg native menu.
I use the following code.
if (elgg_is_logged_in()) {
elgg_register_menu_item('topbar', array(
'name' => 'my_sub_menu',
'href' => ''my_pluging/pessek',
'text' => elgg_echo('my_sub_menu:pessek'),
'priority' => 500,
'section' => 'alt',
));
}
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.
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 1 like
- Hermand Pessek@rheman
Hermand Pessek - 0 likes
- iionly@iionly
iionly - 1 like
- Hermand Pessek@rheman
Hermand Pessek - 0 likes
You must log in to post replies.Because:
Learn this and look at this
Thanks
I have read but still dont know what to do..
Best regard
You need to define the parent name menu item to get it displayed as submenu item. Not sure if it works with the following (I've just looked into start.php of the Aalborg theme plugin where the Accounts menu is defined):
but you can give it a try. Setting the priority is most likely unnecessary. The section is very likely unnecessary. If you want the section set you can add the line
before elgg_register_menu_item().
Thanks a lot.. work perfectly