Thanks Evan, still confuse though, e.g. the 1st snippet below will register a menu item into "site" menu list, the 2nd snippet will register a menu to the plugin page. Is "site", "page" the reserve terms in elgg? if so what's other terms?
Of course I have to dig into the code more to understand the menu registration mechanism.
$item = new ElggMenuItem('hello', 'Hello', 'hello/world');
elgg_register_menu_item('site', $item);
$item = new ElggMenuItem('hello', 'Hello', 'hello/world');
elgg_register_menu_item('page', $item);
These are menus that core already outputs using elgg_view_menu is some existing views.
So basically, searching for elgg_view_menu is your best bet
I added "index/righthandside" view as "mod/custom_index/views/index/righthandside.php", then tried to load the page again, the new added view is not loaded as usual. Then I went to admin dashboard to "Flush the caches", I saw the "views_location" file got updated then I reload the index page again, the new added view "index/righthandside" got loaded.
Now I understand the note in http://learn.elgg.org/en/latest/guides/views.html
Elgg caches view locations. This means that you should disable the system cache while working with views. When you install the changes to a production environment you mush flush the caches.
During development (not on production server) it's often better to turn off the caching in the admin section (Advanced settings) to avoid this problem with updated views not showing up.
I still would suggest to use elgg_extend_view instead of saving the view directly as "index/righthandside" / "index/lefthandside". Just try it as I suggested in my last posting.
Hi iionly,
Thanks a lot. Yes I did try what you suggested, it works like a charm :)
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.