Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-78451

Local extend_navigation Callback does not work in Boost anymore

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 4.1.3
    • Navigation
    • None
    • MOODLE_401_STABLE

      Calling `local_pluginname_extend_navigation` in a plugin’s `lib.php` does not have any effect (probably already since version 4 but we only noticed and tested it in 4.1).
      This is because the callback’s only parameter is the global navigation (`$PAGE->naviation`), which made way for the primary/secondary navigation (`$PAGE->primarynav`, …).

      What are the plans for allowing plugins to extend the primary navigation? Will the existing callback be adapted? Or will there be a new callback for this?
      Maybe changing the type of the callback’s `$nav` parameter from `global_navigation` to `navigation_node` might be a start, so at least a theme could query the callbacks itself and provide the primary navigation node instead.

      The callback for extending the course navigation still works (for topics, we did only test this format), but there seems to be no way of specifying at which position a menu item appears (providing `$beforekey` of `navigation_node::add_node()` did not work as expected).
      Are there any plans to make specifying the position possible?

      If we misunderstood or missed something, please consider this a bug report for missing or outdated documentation, as we really could not find anything that helped us solve the mentioned problems. For reference, this specific part seems outdated: https://moodledev.io/docs/apis/core/navigation#local-plugins

            Unassigned Unassigned
            smeikx Alex Kremser
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.