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