This article will cover basic Main Menu configuration and customization.
TOPICS
Configuring the Main Menu
Site administrators can customize the contents of the Main menu bar via the user interface in order to add, edit or remove navigation menu items. The visibility of navigation items can also be restricted to members of an Audience.
Go to Site administration > Navigation > Main menu to display the configuration page listing existing navigation menu items and their hierarchies.
The capability totara/core:editmainmenu controls access to the configuration pages where allowed users can:
- Select the corresponding edit icon (
) to update navigation item settings
- Re-order page items using the up/down arrows
- Show/hide page items from the navigation bar (eye icon)
- Delete custom navigation items
Creating Menu Items
Create custom navigation menu items by clicking the Add new menu item button.
Custom Access
To add a custom access rule to a navigation item:
- Select Site administration > Navigation > Main menu.
- Select the Edit icon (
) against the corresponding menu item
- Select Use custom access rules under Visibility and Save changes.
- Select the Access tab to define the access rule.
- Select whether all or any of the Restrict access criteria need to be met to view the navigation item.
- Fill in the criteria for the role, audience, and/or preset rule.
- Select Save changes.
An administrator cannot delete the default 'hard coded' menu options but, from a user’s point of view, hiding them has the same effect.
URL Placeholders
When defining custom navigation item URLs, you can include the following placeholders:
- ##userid## - Current user id.
- ##username## - Current username.
- ##useremail## - Current user email.
- ##courseid## - Current course ID.
They will be dynamically substituted for the appropriate value at the time when the page is viewed.
Resetting the Main Menu
To revert to the standard Totara Learn Main Menu, site administrators can use the Reset menu to default configuration button. If any custom menu items have been previously added, a prompt will be displayed to specify whether to permanently delete these items or move them to the Unused section so they are hidden but available in the menu for later reuse or reference.