How to make Moodle custom menu link open a new browser window

By default Moodle will open custom menu links in the current browser window, which works well if all of your custom menu links point to pages inside your Moodle site. However, if you’d like to point to an external link (eg. your organisation’s official website), it’s best to make the link open a new browser window/tab. That way your users are not being taken away from your Moodle site after clicking the link.

Below are the steps you can follow to make your custom menu links open in a new browser window.

Step 1

Log in to your Moodle site as an admin user, and navigate to the “Theme Settings” option under the Administration block: Administration > Site administration > Appearance > Themes > Theme settings

Step 2

Find the Custom menu items section and add "target="_blank after the desired link target URL.

The figure below shows how we make all of the external links in our Moodle demo open new windows.

moodle-custom-menu-links

You can try our Moodle demo to see the menu behaviour yourself.

moodle-custom-menu-links-demo

Want to master Moodle?

Moodle 3.0 Masterclass: Your Complete Guide to Moodle 3.0

This online course on Moodle 3.0 will teach you how to create WORLD CLASS online courses. Leverage Moodle 3 like a BOSS!

600+ students enrolled

Want to set up Moodle?

Learn to Host Moodle with Linux

Become a Moodle Administrator a much needed skill . More than 70 million users across 230 countries are using Moodle.

1000+ students enrolled
  • I want every link on my site to go to a Google Drive document. My option is to use a pop up and define the window size, which actually opens a limited window. I just want “target=”_blank to be applied to every link on my Moodle site. I am really using Moodle as a link launcher and gradebook (e.g., I use phpBB for class discussions, which I also want to be in a “target=”_blank window).