How to add link for Plugin in navigation block?

How to add link for Plugin in navigation block?

by Adam Nielsen -
Number of replies: 4

I would like to create a report plugin where the link should be added to the navigation for every user (everyone who is logged in shall see the report).

Where in my plugin can I add this option?

I know that one can add a link in the admin menu in `settings.php` like this:

         $ADMIN->add('reports',
            new admin_externalpage('reportmyplugin', get_string('pluginname','report_myplugin'),
            $url
          ));


But how can I add a link in the navigation block?

Average of ratings: -
In reply to Adam Nielsen

Re: How to add link for Plugin in navigation block?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I think you answered your own question, here - https://moodle.org/mod/forum/discuss.php?d=405950

Please don't start multiple threads about what is basically the same thing smile
In reply to Howard Miller

Re: How to add link for Plugin in navigation block?

by Adam Nielsen -

Thank you for the answer and sorry if my question was unclear. They are actually two different questions. The question that you linked to is about authorization. This question is about how to make the link to the report viewable to everyone.

In the question you linked and in this thread I explained that I already know how to add the link to the admin area. This is accessible for admins, moderators, teachers etc, but not for students:

Side Administration

The question that I ask here is, how can I add a link to a report in the navigation so everyone who is logged in (including students) can see it in the navigation:

Add item to navigation