I just started using Elgg, and I am creating a plugin right now for a custom main menu. So for instance, I have a mainmenu.php file located in "mod/myplugin/mainmenu.php". I tried to use "echo elgg_view( $CONFIG-> wwwroot . "mod/myplugin/mainmenu", $vars);" but it doesn't work! Can someone please advise on how to include my custom php file as a view? Thanks!
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.
- Kevin Jardine@kevin
Kevin Jardine - 0 likes
- Kit Huynh@kithuynh
Kit Huynh - 0 likes
- Kevin Jardine@kevin
Kevin Jardine - 0 likes
- Kit Huynh@kithuynh
Kit Huynh - 0 likes
- Kit Huynh@kithuynh
Kit Huynh - 0 likes
You must log in to post replies.You need to read the docs:
http://docs.elgg.org/wiki/Views
I have read that but that post talks about overriding views of the Elgg engine which is simple enough to do. I don't want to override any view, I want to create a new custom view and display it...
If you are trying to pass a URL to elgg_view, you need to read the docs more carefully.
Sorry, but that is what they are there for - to avoid answering the same questions over and over again.
Ok thanks!
I've looked at other plugins, and it looks like they have a page handler for any custom views they made. So declaring page handler and then a method for the page handler should work. However in the page handler method what gets stored as page[0], page[1]. etc? I am first led to believe that all custom views need to be in a VIEWS folder in order to use the elgg_view() function, is this true?