Handling question marks in Custom Menu item links

In a recent thread on Moodle.org forums, one of the Moodler asked a question about adding a link in the custom menu. He was trying to add a link in the custom menu items field on the Theme settings page with having a question mark in between the link, due to which that particular link was opening in the same tab, whereas all other links were opening in the new tab because of the target=”_blank” attribute.

Question Mark in Custom Menu link
Question Mark in Custom Menu link

One of the PHM (Particularly Helpful Moodler) answered to use the HTML code of the question mark i.e. ? instead of using the question mark directly within the url as it’s a bit of a bug that question marks were not handled properly in the custom menus.

After trying the same (replacing ? with its HTML code i.e. ?) the link item started getting opening in the new tab.

So, I just thought to share such kind of small tips and tricks which can save your time whenever you face such petty issues which can eat up a lot of time.

Hope it helps someone in need…


Reference: https://moodle.org/mod/forum/discuss.php?d=307708

Jaswinder Singh

Jaswinder Singh, passionate about using Moodle in improving the Indian Education System and reaching the students in far flung areas where still education seems to be a impossible prospect of life. He is the author of the popular Moodle Book "How to use Moodle 2.7". In October 2016, Jaswinder was elected as the Moodle User's Association Committee member - the first to make it from India.

Related Articles