So as you would of all noticed I have been asking a lot of questions as I am creating my first live Elgg site. Now every thing that gets done in my plugin gets done in the start.php, which means that file is like a wall of text so what I was thinking to make it easier for people to use and find thins is there a way to edit the owner_block from somewhere like /mod/theme/views/\default/page/elements/owner_block.php and if so how do I call the code.
This way the start.php has the very basic of information in it and all other files do the work.
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.
- Paweł Sroka@srokap
Paweł Sroka - 0 likes
- iionly@iionly
iionly - 0 likes
You must log in to post replies.Read about overriding views at http://docs.elgg.org/wiki/Engine/Views
What exactly are you doing in start.php that you think can be done in a view? If it's the registering of the menu items, then you can't do that by overriding a view. But you could take the Coldtrick plugins like Profile Manager as an example of how to organize your code. For example plugin hook callback functions are sourced out from start.php into lib/hooks.php, event callbacks into lib/events.php and other functions into lib/functions.php. You would load these libs in start.php and only register the events and plugin hook handlers in start.php but otherwise the size of your start.php would be much smaller.