Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
f3a1a36f
Commit
f3a1a36f
authored
Aug 19, 2009
by
Richard Mansfield
Browse files
Add hook for local customisation of logged-in menu
parent
09ea00e2
Changes
3
Hide whitespace changes
Inline
Side-by-side
htdocs/init.php
View file @
f3a1a36f
...
...
@@ -80,6 +80,7 @@ ensure_sanity();
require
(
'dml.php'
);
require
(
'web.php'
);
require
(
'user.php'
);
require
(
get_config
(
'docroot'
)
.
'local/lib.php'
);
// Database access functions
require
(
'adodb/adodb-exceptions.inc.php'
);
...
...
htdocs/lib/web.php
View file @
f3a1a36f
...
...
@@ -2005,6 +2005,10 @@ function main_nav() {
$menu
=
mahara_standard_nav
();
}
// local_main_nav_update allows sites to customise the menu by munging the $menu array.
if
(
function_exists
(
'local_main_nav_update'
))
{
local_main_nav_update
(
$menu
);
}
$menu_structure
=
find_menu_children
(
$menu
,
''
);
return
$menu_structure
;
}
...
...
htdocs/local/lib.php
0 → 100644
View file @
f3a1a36f
<?php
/**
* Library file for miscellaneous local customisations.
*
* For simple customisation of a Mahara site, the core code will call some local_* functions
* which may be defined in this file.
*
* - Define the function local_main_nav_update(&$menu) to modify the main navigation menu in the header.
*/
?>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment