diff options
Diffstat (limited to 'mod/pages/start.php')
-rw-r--r-- | mod/pages/start.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/mod/pages/start.php b/mod/pages/start.php index 23c564da5..3404a8cd2 100644 --- a/mod/pages/start.php +++ b/mod/pages/start.php @@ -33,9 +33,15 @@ function pages_init() { elgg_register_action("pages/editwelcome", "$action_base/editwelcome.php"); elgg_register_action("pages/delete", "$action_base/delete.php"); - // Extend some views + // Extend the main css view elgg_extend_view('css/elgg', 'pages/css'); + // Register javascript needed for sidebar menu + $js_url = 'mod/pages/vendors/jquery-treeview/jquery.treeview.min.js'; + elgg_register_js('jquery-treeview', $js_url); + $css_url = 'mod/pages/vendors/jquery-treeview/jquery.treeview.css'; + elgg_register_css('jquery-treeview', $css_url); + // Register entity type for search elgg_register_entity_type('object', 'page'); elgg_register_entity_type('object', 'page_top'); @@ -100,10 +106,8 @@ function pages_page_handler($page) { elgg_load_library('elgg:pages'); // add the jquery treeview files for navigation - $js_url = elgg_get_site_url() . 'mod/pages/vendors/jquery-treeview/jquery.treeview.min.js'; - elgg_register_js('jquery-treeview', $js_url); - $css_url = elgg_get_site_url() . 'mod/pages/vendors/jquery-treeview/jquery.treeview.css'; - elgg_register_css('jquery-treeview', $css_url); + elgg_load_js('jquery-treeview'); + elgg_load_css('jquery-treeview'); if (!isset($page[0])) { $page[0] = 'all'; |