Hello,
I'm trying to override pages/river.php with something like:
elgg_register_page_handler('activity', 'my_page_activity');
function my_page_activity() { ... } // In mod/my/start.php
However, this does not seem to work at all and the function is never called.
Could anyone point me in right direction for doing something like this?
Many thanks,
Chris
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.
- Per Jensen@gillie
Per Jensen - 0 likes
- Chris@chris00
Chris - 0 likes
- Matt Beckett@Beck24
Matt Beckett - 0 likes
You must log in to post replies.Try to unregister the default page handler before registering your own,
elgg_unregister_page_handler('activity', 'elgg_river_page_handler');
Thanks, but that doesn't seem to work. The function still isn't called.
Have I put this in the correct place? mod/my/start.php?
I notice that, say, elgg_unregister_menu_item('topbar', ...) only works if it's put in the views/default/page/elements/topbar.php file.
(See http://community.elgg.org/discussion/view/1183088/unregistering-the-settings-menu-item "unregistering items codes needs to be in certain php files. try putting your code in topbar.php")
It should be in called in your plugins init, make sure you return (bool)true to end the page handler.