I was doing some research into the hackneyed topic of making the Elgg menu thingy un-clunky. First - I believe that Elgg version 1.7 or 1.8 has catered for souping up the menu system. The previous demo.elgg.org did showcase this (current demo.elgg.org seems to the elgg comm duplicated;- ) If that is correct.. then all discussions on menus becomes redundant. Secondly, my research shows some interesting stuff ;-) apparently all the menu and sub-menu items are stored in a global $CONFIG data structure - so we can knock up some code to retrieve these and create whatever system-wide menu views that we like ! If this were to be done - we most probably should go for a simpler canvas layout, say one_column.php, because the left sidebvar is no longer needed. Hmm, I might spend a little more time investigating more details from the results of my research.. though I might add that many other people have already customised the menu system and created some very interesting and user-friendly menus for their elgg-based websites.
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.
Wooopeee! this sounds like good stuff... if there is a way, please find it :) I think everyone would be eternally grateful.
I have havy customized menus on my site ... :)
Just found a way to put menus in to views and than extend views on page this way I keep order.
the problem is how to grab all add_menu submenu codes from plugins ...
my url www.novalive.org
Dieter: LOLZ ;-O
Why didn't you just ask ?
Each "add_submenu_item(.." shows the new sub menu items beinig added ;-)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ELGG_SUB_MENU_CODE.LOG
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C: / xampp / htdocs / _FBFKIDS / engine / lib / elgglib.php
Line: 465 function add_submenu_item($label , $link , $group = 'a' , $onclick = false) {
Line: 751 function menu_item($menu_name , $menu_url) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C: / xampp / htdocs / _FBFKIDS / engine / lib / admin.php
Line: 44 add_submenu_item(elgg_echo ('admin:statistics') , $CONFIG->wwwroot . 'pg/admin/statistics/' );
Line: 45 add_submenu_item(elgg_echo ('admin:site') , $CONFIG->wwwroot . 'pg/admin/site/' );
Line: 46 add_submenu_item(elgg_echo ('admin:user') , $CONFIG->wwwroot . 'pg/admin/user/' );
Line: 47 add_submenu_item(elgg_echo ('admin:plugins') , $CONFIG->wwwroot . 'pg/admin/plugins/' );
C: / xampp / htdocs / _FBFKIDS / engine / lib / users.php
Line: 717 add_submenu_item(elgg_echo ('friends:collections') , $CONFIG->wwwroot . "pg/collections/" . $user->username );
Line: 718 add_submenu_item(elgg_echo ('friends:collections:add') , $CONFIG->wwwroot."pg/collections/add" );
Line: 786 add_submenu_item(elgg_echo ('friends') , $CONFIG->wwwroot."pg/friends/" . page_owner_entity()->username );
Line: 787 add_submenu_item(elgg_echo ('friends:of') , $CONFIG->wwwroot."pg/friendsof/" . page_owner_entity()->username );
C: / xampp / htdocs / _FBFKIDS / engine / lib / usersettings.php
Line: 27 add_submenu_item(elgg_echo ('usersettings:user:opt:linktext') , $CONFIG->wwwroot . "pg/settings/user/{$user->username}/" );
Line: 28 // add_submenu_item(elgg_echo ('profile:editicon') , $CONFIG->wwwroot . 'mod/profile/editicon.php' );
Line: 29 add_submenu_item(elgg_echo ('usersettings:plugins:opt:linktext') , $CONFIG->wwwroot . "pg/settings/plugins/{$user->username}/" );
Line: 30 add_submenu_item(elgg_echo ('usersettings:statistics:opt:linktext') , $CONFIG->wwwroot . "pg/settings/statistics/{$user->username}/" );
C: / xampp / htdocs / _FBFKIDS / mod / blog / start.php
Line: 43 add_submenu_item(elgg_echo ('blog:your') , $CONFIG->wwwroot."pg/blog/" . $_SESSION['user']->username );
Line: 44 add_submenu_item(elgg_echo ('blog:friends') , $CONFIG->wwwroot."pg/blog/" . $_SESSION['user']->username . "/friends/" );
Line: 45 add_submenu_item(elgg_echo ('blog:everyone') , $CONFIG->wwwroot."mod/blog/everyone.php" );
Line: 46 add_submenu_item(elgg_echo ('blog:addpost') , $CONFIG->wwwroot."mod/blog/add.php" );
Line: 49 add_submenu_item(sprintf(elgg_echo ('blog:user') , $page_owner->name) , $CONFIG->wwwroot."pg/blog/" . $page_owner->username );
Line: 51 add_submenu_item(sprintf(elgg_echo ('blog:user:friends') , $page_owner->name) , $CONFIG->wwwroot."pg/blog/" . $page_owner->username . "/friends/" );
Line: 52 add_submenu_item(elgg_echo ('blog:everyone') , $CONFIG->wwwroot."mod/blog/everyone.php" );
Line: 53 add_submenu_item(elgg_echo ('blog:everyone') , $CONFIG->wwwroot."mod/blog/everyone.php" );
Line: 61 add_submenu_item(sprintf(elgg_echo ('date:month:'.substr($date , 4 , 2)) , substr($date , 0 , 4)) , $link , 'filter' );
C: / xampp / htdocs / _FBFKIDS / mod / bookmarks / start.php
Line: 17 add_submenu_item(elgg_echo ('bookmarks:inbox') , $CONFIG->wwwroot."pg/bookmarks/" . $_SESSION['user']->username . "/inbox" );
Line: 18 add_submenu_item(elgg_echo ('bookmarks:read') , $CONFIG->wwwroot."pg/bookmarks/" . $_SESSION['user']->username . "/items" );
Line: 19 add_submenu_item(elgg_echo ('bookmarks:bookmarklet') , $CONFIG->wwwroot . "mod/bookmarks/bookmarklet.php" );
Line: 20 add_submenu_item(elgg_echo ('bookmarks:friends') , $CONFIG->wwwroot."pg/bookmarks/" . $_SESSION['user']->username . "/friends" );
Line: 21 add_submenu_item(elgg_echo ('bookmarks:everyone') , $CONFIG->wwwroot."mod/bookmarks/everyone.php" );
C: / xampp / htdocs / _FBFKIDS / mod / categories / start.php
Line: 17 add_submenu_item(elgg_echo ('categories:settings') , $CONFIG->wwwroot . 'mod/categories/settings.php' );
C: / xampp / htdocs / _FBFKIDS / mod / diagnostics / start.php
Line: 17 add_submenu_item(elgg_echo ('diagnostics') , $CONFIG->wwwroot . 'pg/diagnostics/' );
C: / xampp / htdocs / _FBFKIDS / mod / externalpages / start.php
Line: 20 add_submenu_item(elgg_echo ('expages') , $CONFIG->wwwroot . 'pg/expages/' );
C: / xampp / htdocs / _FBFKIDS / mod / file / views / default / file / typecloud.php
Line: 32 add_submenu_item($label , $url , 'filetypes' );
C: / xampp / htdocs / _FBFKIDS / mod / file / start.php
Line: 46 add_submenu_item(sprintf(elgg_echo ("file:group") , $page_owner->name) , $CONFIG->wwwroot . "pg/file/" . $page_owner->username );
Line: 50 add_submenu_item(sprintf(elgg_echo ("file:yours") , $page_owner->name) , $CONFIG->wwwroot . "pg/file/" . $page_owner->username );
Line: 51 add_submenu_item(sprintf(elgg_echo ('file:yours:friends') , $page_owner->name) , $CONFIG->wwwroot . "pg/file/". $page_owner->username . "/friends/" );
Line: 53 add_submenu_item(sprintf(elgg_echo ("file:user") , $page_owner->name) , $CONFIG->wwwroot . "pg/file/" . $page_owner->username );
Line: 55 add_submenu_item(sprintf(elgg_echo ('file:friends') , $page_owner->name) , $CONFIG->wwwroot . "pg/file/". $page_owner->username . "/friends/" );
Line: 56 add_submenu_item(elgg_echo ('file:all') , $CONFIG->wwwroot . "mod/file/world.php" );
Line: 58 add_submenu_item(elgg_echo ('file:upload') , $CONFIG->wwwroot . "pg/file/". $page_owner->username . "/new/" );
C: / xampp / htdocs / _FBFKIDS / mod / groups / start.php
Line: 120 add_submenu_item(elgg_echo ('groups:edit') , $CONFIG->wwwroot . "mod/groups/edit.php?group_guid=" . $page_owner->getGUID() , '1groupsactions' );
Line: 121 add_submenu_item(elgg_echo ('groups:invite') , $CONFIG->wwwroot . "mod/groups/invite.php?group_guid={$page_owner->getGUID()}" , '1groupsactions' );
Line: 123 add_submenu_item(elgg_echo ('groups:membershiprequests') , $CONFIG->wwwroot . "mod/groups/membershipreq.php?group_guid={$page_owner->getGUID()}" , '1groupsactions' );
Line: 126 add_submenu_item(elgg_echo ('groups:leave') , $CONFIG->wwwroot . "action/groups/leave?group_guid=" . $page_owner->getGUID() , '1groupsactions' );
Line: 128 add_submenu_item(elgg_echo ('groups:join') , $CONFIG->wwwroot . "action/groups/join?group_guid={$page_owner->getGUID()}" , '1groupsactions' );
Line: 129 add_submenu_item(elgg_echo ('groups:joinrequest') , $CONFIG->wwwroot . "action/groups/joinrequest?group_guid={$page_owner->getGUID()}" , '1groupsactions' );
Line: 131 add_submenu_item(elgg_echo ('groups:forum') , $CONFIG->wwwroot . "pg/groups/forum/{$page_owner->getGUID()}/" , '1groupslinks' );
Line: 135 add_submenu_item(elgg_echo ('groups:new') , $CONFIG->wwwroot."pg/groups/new/" , '1groupslinks' );
Line: 136 add_submenu_item(elgg_echo ('groups:owned') , $CONFIG->wwwroot . "pg/groups/owned/" . $_SESSION['user']->username , '1groupslinks' );
Line: 137 add_submenu_item(elgg_echo ('groups:yours') , $CONFIG->wwwroot . "pg/groups/member/" . $_SESSION['user']->username , '1groupslinks' );
Line: 138 add_submenu_item(elgg_echo ('groups:all') , $CONFIG->wwwroot . "pg/groups/world/" , '1groupslinks' );
C: / xampp / htdocs / _FBFKIDS / mod / invitefriends / start.php
Line: 12 add_submenu_item(elgg_echo ('friends:invite') , $CONFIG->wwwroot."mod/invitefriends/" , 'invite' );
C: / xampp / htdocs / _FBFKIDS / mod / logbrowser / start.php
Line: 20 add_submenu_item(elgg_echo ('logbrowser') , $CONFIG->wwwroot . 'pg/logbrowser/' );
C: / xampp / htdocs / _FBFKIDS / mod / messages / start.php
Line: 17 add_submenu_item(elgg_echo ('messages:inbox') , $CONFIG->wwwroot . "pg/messages/" . $_SESSION['user']->username );
Line: 18 add_submenu_item(elgg_echo ('messages:compose') , $CONFIG->wwwroot . "mod/messages/send.php" );
Line: 19 add_submenu_item(elgg_echo ('messages:sentmessages') , $CONFIG->wwwroot . "mod/messages/sent.php" );
C: / xampp / htdocs / _FBFKIDS / mod / notifications / start.php
Line: 10 add_submenu_item(elgg_echo ('notifications:subscriptions:changesettings') , $CONFIG->wwwroot . "mod/notifications/" );
Line: 12 add_submenu_item(elgg_echo ('notifications:subscriptions:changesettings:groups') , $CONFIG->wwwroot . "mod/notifications/groups.php" );
C: / xampp / htdocs / _FBFKIDS / mod / pages / history.php
Line: 18 add_submenu_item(sprintf(elgg_echo ("pages:user") , page_owner_entity()->name) , $CONFIG->url . "pg/pages/owned/" . page_owner_entity()->username , 'pageslinksgeneral' );
C: / xampp / htdocs / _FBFKIDS / mod / pages / index.php
Line: 11 add_submenu_item(sprintf(elgg_echo ("pages:user") , page_owner_entity()->name) , $CONFIG->url . "pg/pages/owned/" . page_owner_entity()->username , 'pageslinksgeneral' );
Line: 12 add_submenu_item(elgg_echo ('pages:all') , $CONFIG->wwwroot."mod/pages/world.php" , 'pageslinksgeneral' );
Line: 14 add_submenu_item(elgg_echo ('pages:new') , $CONFIG->url . "pg/pages/new/?container_guid=" . page_owner() , 'pagesactions' );
Line: 15 if ($owner instanceof ElggUser) add_submenu_item(elgg_echo ('pages:welcome') , $CONFIG->url . "pg/pages/welcome/" , 'pagesactions' );
C: / xampp / htdocs / _FBFKIDS / mod / pages / new.php
Line: 22 add_submenu_item(sprintf(elgg_echo ("pages:user") , page_owner_entity()->name) , $CONFIG->url . "pg/pages/owned/" . page_owner_entity()->username , 'pageslinksgeneral' );
C: / xampp / htdocs / _FBFKIDS / mod / pages / start.php
Line: 60 add_submenu_item(sprintf(elgg_echo ("pages:group") , $page_owner->name) , $CONFIG->wwwroot . "pg/pages/owned/" . $page_owner->username );
Line: 83 add_submenu_item(elgg_echo ('pages:label:view') , $CONFIG->url . "pg/pages/view/{$page[1]}" , 'pageslinks' );
Line: 84 // add_submenu_item(elgg_echo ('pages:user') , $CONFIG->wwwroot . "pg/pages/owned/" . $_SESSION['user']->username , 'pageslinksgeneral' );
Line: 85 if (($entity) && ($entity->canEdit())) add_submenu_item(elgg_echo ('pages:label:edit') , $CONFIG->url . "pg/pages/edit/{$page[1]}" , 'pagesactions' );
Line: 86 add_submenu_item(elgg_echo ('pages:label:history') , $CONFIG->url . "pg/pages/history/{$page[1]}" , 'pageslinks' );
Line: 93 // add_submenu_item(elgg_echo ('pages:label:view') , $CONFIG->url . "pg/pages/view/{$page[1]}" , 'pageslinks' );
Line: 94 if (($entity) && ($entity->canEdit())) add_submenu_item(elgg_echo ('pages:label:edit') , $CONFIG->url . "pg/pages/edit/{$page[1]}" , 'pagesactions' );
Line: 95 add_submenu_item(elgg_echo ('pages:label:history') , $CONFIG->url . "pg/pages/history/{$page[1]}" , 'pageslinks' );
Line: 102 add_submenu_item(elgg_echo ('pages:label:view') , $CONFIG->url . "pg/pages/view/{$page[1]}" , 'pageslinks' );
Line: 103 if (($entity) && ($entity->canEdit())) add_submenu_item(elgg_echo ('pages:label:edit') , $CONFIG->url . "pg/pages/edit/{$page[1]}" , 'pagesactions' );
Line: 104 add_submenu_item(elgg_echo ('pages:label:history') , $CONFIG->url . "pg/pages/history/{$page[1]}" , 'pageslinks' );
C: / xampp / htdocs / _FBFKIDS / mod / pages / view.php
Line: 17 // add_submenu_item(sprintf(elgg_echo ("pages:user") , page_owner_entity()->name) , $CONFIG->url . "pg/pages/owned/" . page_owner_entity()->username , 'pageslinksgeneral' );
Line: 19 add_submenu_item(elgg_echo ('pages:newchild') , "{$CONFIG->wwwroot}pg/pages/new/?parent_guid={$pages->getGUID()}&container_guid=" . page_owner() , 'pagesactions' );
Line: 20 add_submenu_item(elgg_echo ('pages:delete') , "{$CONFIG->wwwroot}action/pages/delete?page={$pages->getGUID()}" , 'pagesactions' , true );
C: / xampp / htdocs / _FBFKIDS / mod / pages / welcome.php
Line: 20 add_submenu_item(sprintf(elgg_echo ("pages:user") , page_owner_entity()->name) , $CONFIG->url . "pg/pages/owned/" . page_owner_entity()->username , 'pageslinksgeneral' );
C: / xampp / htdocs / _FBFKIDS / mod / pages / world.php
Line: 14 add_submenu_item(elgg_echo ('pages:new') , $CONFIG->url . "pg/pages/new/" , 'pagesactions' );
Line: 15 add_submenu_item(elgg_echo ('pages:welcome') , $CONFIG->url . "pg/pages/welcome/" , 'pagesactions' );
Line: 17 add_submenu_item(sprintf(elgg_echo ("pages:user") , page_owner_entity()->name) , $CONFIG->url . "pg/pages/owned/" . page_owner_entity()->username , 'pageslinksgeneral' );
Line: 18 add_submenu_item(elgg_echo ('pages:all') , $CONFIG->wwwroot."mod/pages/world.php" , 'pageslinksgeneral' );
C: / xampp / htdocs / _FBFKIDS / mod / profile / start.php
Line: 48 add_submenu_item(elgg_echo ('profile:editdetails') , $CONFIG->wwwroot . "mod/profile/edit.php" );
Line: 49 add_submenu_item(elgg_echo ('profile:editicon') , $CONFIG->wwwroot . "mod/profile/editicon.php" );
Line: 107 add_submenu_item(elgg_echo ('profile:edit:default') , $CONFIG->wwwroot . 'pg/defaultprofile/edit/' );
C: / xampp / htdocs / _FBFKIDS / mod / reportedcontent / start.php
Line: 20 add_submenu_item(elgg_echo ('reportedcontent') , $CONFIG->wwwroot . 'pg/reportedcontent/' );
C: / xampp / htdocs / _FBFKIDS / mod / sticky_widgets / start.php
Line: 32 add_submenu_item(elgg_echo ('sw:title') , $CONFIG->wwwroot . 'pg/sticky_widgets/admin/edit.php' , "s" );
Line: 34 add_submenu_item(elgg_echo ('sw:title:defaults') , $CONFIG->wwwroot . 'pg/sticky_widgets/admin/defaults.php' , "s" );
C: / xampp / htdocs / _FBFKIDS / mod / thewire / start.php
Line: 43 add_submenu_item(elgg_echo ('thewire:read') , $CONFIG->wwwroot."pg/thewire/" . $_SESSION['user']->username );
Line: 44 add_submenu_item(elgg_echo ('thewire:everyone') , $CONFIG->wwwroot."mod/thewire/everyone.php" );
Line: 45 // add_submenu_item(elgg_echo ('thewire:add') , $CONFIG->wwwroot."mod/thewire/add.php" );
C: / xampp / htdocs / _FBFKIDS / search / index.php
Line: 38 add_submenu_item(elgg_echo ($label) , $CONFIG->wwwroot . "search/?tag=". urlencode($tag) ."&subtype=" . $object_subtype . "&object=". urlencode($object_type) ."&tagtype=" . urlencode($md_type) . "&owner_guid=" . urlencode($owner_guid) );
Line: 39 add_submenu_item(elgg_echo ('all') , $CONFIG->wwwroot . "search/?tag=". urlencode($tag) ."&owner_guid=" . urlencode($owner_guid) );
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
But when I right understanding. elgg has only 2 sorted places to show menus
add_menu for topbar
and
add_submenu_item for left sidebar
there is no way to sort out single menu item.
Sounds about right. the list I posted is from a GREP report - I could not find the sub-menus stored anywhere within elgg's $CONFIG or $_SESSION data. Post some elaboration on which "single menu item" you are looking for ?
I take "All site photo albums" item. Put this only one menu item in to the view "allsitephotoalbums".
And than extend some view of tidypics inside "contentWrapper" div there where content is displaying.
extend_view( someview-oftidypics, allsitephotoalbums, 501)
to sorting it out I use displaying views before or after by 499 or 555.
I decided to remodel my menu system too.
I have menus with sub-menus on the left hand side of the main content page...
ok, they stay the same no matter which page you are on, but because all the ones are there that you need, hey presto! and if I want others, I just hand code them into the header_contents... bingo! If I can work out how to make it into a plugin, it might be useful to others http://www.activityseeker.com and sign in with Twitter etc. if you want to see (they are off when not logged in).
Kinda neat.. I like YourCssMenu ;-)
I tried to make an css dropdown menu. Each time the page was loading was this css menu not access-able. JQuery tabs menu what I use now is also not perfect.
@Dieter:
Post yr code here or email to me.. I'll have a look ;-)
Grüße !;)
- Previous
- 1
- 2
- Next
You must log in to post replies.