If you have a resource file (where you draw the page) you can load the JS you need on that page, with the function elgg_require_js()
If you have JS you need on every page (mostly not the case) you can extend the elgg.js view in your elgg-plugin.php. Or you could make a Bootstrap class, register is in the elgg-plugin.php and the init() function (if done correctly) will automatically be called on every page.
You see, I followed the Developers plugin, but could not understand how it was routing and registering it in the menu.....
Please clarify this setup, for my routing, I need to put my php files in the following location:
/var/www/html/elgg/mod/curriculum/views/default/resources
But in the bootstrap init() function, if I want to cal the code,
elgg_register_external_file('js', 'curriculum', elgg_get_simplecache_url('js/curriculum.js'));
elgg_load_external_file('js', 'curriculum');
or load a php file, all the js and php files should be in the resources folder only,
or whether it should be in the folder which has the bootstrap file....for since init() function would call it in every page....
I don't think the Developers plugin is a good example of how you should route to content pages.
Best have a look at the Blog plugin.
Routes are defined here:
Learn more about routing http://learn.elgg.org/en/stable/guides/routing.html
The loading of a JS file can be seen here
and the JS file is located in /mod/blog/views/default/forms/blog/save.js
elgg_register_external_file() and elgg_load_external_file() shouldn't be needed is most cases.
Learn more about JS in Elgg http://learn.elgg.org/en/stable/guides/javascript.html
You also mentioned menu items, check this http://learn.elgg.org/en/stable/guides/menus.html
In the Blog plugins this is registered here
Didn't anything help from this (especially the comments there)?
Alright I have disabled the Front Page Demo.....
But now my home page work, I tried changing the setting, but I don't want users to see the messages unless they login...
But its not happening...
1 - Clean the caches
2- Don't use Elgg Theme Landing plugin ¯\_(ツ)_/¯
I tried cleaning the cache...
What I meant to say was your demo had the option of Name of the Community Picture, and then members and groups only....
I was wondering how you update the landing page,
for in the settings I can't remove the site activity, which I want people to see only after they login....
For you see, if you go to the link - you will see all the site activity without login.....
Is there a way I could hide them, may be some other settings....
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.