General developer forum

How to add single custom link to menu?

Picture of Augusto R. M.
How to add single custom link to menu?

How to add single custom link to menu?

I have a local plugin with index.php

I just want a single link to point to that local/myplugin/index.php

How to do it qick and dirty

Thank you

Average of ratings: -
Picture of Michael Milette
Re: How to add single custom link to menu?
Core developersParticularly helpful MoodlersPlugin developers

Hi Augusto,

Assuming your Moodle theme supports custom menu items, you can add a new menu item by completing the following steps:

  1. Click Home > Site administration > Appearance > Theme settings
  2. Scroll down to the Custom menu items field.
  3. Enter: My Plugin|/local/myplugin/index.php
  4. Scroll to the bottom of the page and click Save changes

That's it. A new menu item called My Plugin should now be visible.

There are other options available to add things like tooltip tags, specify that the menu item should only appear in certain languages, create sub-menu items and even trick it into opening the link in a new window assuming your theme supports them.

That all there is to it. Just be sure to put each additional menu on a separate line.

Hope you find this useful. Let us know if you have any other questions.

Best regards,

Michael Milette

Average of ratings: -