Site administrators can customise 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.
(The video above was taken from the Dashboards and basic theming course in Totara Academy).
Configuring the Main Menu
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.
Setting | Description | Notes |
---|---|---|
Type | Choose whether the menu item will be a Parent (container) for menu items or it's own URL (link). | - |
Parent item | Select either Top to create a top level navigation menu item, or another menu item to create a second or third level navigation item. | - |
Item title | This is the string that appears as the navigation item name. | If the multi-language filter is enabled, these can be multi-lingual strings. |
Visibility | Controls whether users can see a navigation item. There are three options:
Show will display if there are no perquisites to a user accessing the item. Show when accessible will show if an item has permission requirements (see more below). | Selecting Use custom access rules will enable the custom Access tab. |
Open link in new window | If checked, the link will open in a separate window. | - |
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.
Show when accessible requirements
Show when accessible will show if an item has permission requirements - if selected the item will only show to users with the relevant permissions to access it. The item may still be shown to a user through another method, but would not show in the menu bar unless they have the permissions to access it.
Users will need to be logged in, and not a guest user, in order to view the menu item.
The table below shows the requirements for access for each of the permission-controlled menu items.
Menu item | Access requirements |
---|---|
Home | User must be logged in, no additional special restrictions |
Dashboard | The dashboard feature has to be enabled and there has to be at least one dashboard available for the user. |
Record of Learning | User must have permissions to access at least one Record of Learning. |
Performance
| User must have access to at least of one the performance menu items. If you set all of the items to Show when accessible then the user will only see items they have access to. For example if I have access to a 360 feedback instance but cannot access any goals then I will only see the 360 feedback menu item. |
Team | User must have reporting team members. |
Reports | User must have at least one assigned report. |
Find Learning | User must have some learning visible to them. |
Find Learning (Legacy catalogues)
| User must be logged in, no additional special restrictions. |
Calendar | User must be logged in, no additional special restrictions |
Learning Plans | User must have at least one assigned learning plan. |
My Bookings | User must have at least one active seminar booking. |
Preview site policies | User must be logged in, no additional special restrictions |
Required Learning | User has to have at least one program or certification. |
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.
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.
The Totara Academy has a whole course dedicated to using Dashboards and basic theming in Totara Learn. Here you can learn more on how to customise your site's appearance, see best practice, and give it a go yourself.