Custom menu items - open in new window

Re: Custom menu items - open in new window

par Joost Elshoff,
Nombre de réponses : 7
Avatar Particularly helpful Moodlers Avatar Testers

Hi Mary,

I doubt that would work in the direction of a solution. The thing is, the target bit of the HTML here is being seen as part of the url:

The thing I'm aiming for is:

Support|https://www.the.url/course/index.php?categoryid=119" target="_blank

But it becomes:

https://www.openedu.nl/moodle/course/index.php?categoryid=119%22%20target%3D%22_blank

I don't know whether reversed encoding makes any sense then, but sure would like to have this URL open in a new tab or window.

En réponse à Joost Elshoff

Re: Custom menu items - open in new window

par Mary Evans,
Avatar Core developers Avatar Documentation writers Avatar Peer reviewers Avatar Plugin developers Avatar Testers

The thing is that firstly the problem with the encoding is caused by your server.

Adding a link here in this forum does not add the code.

However, the target=_blank has not worked for years. which is probably a browser problem.

Even using Right click and select open in new window,  has no effect either so...I think this is bug that will never get fixed.

En réponse à Joost Elshoff

Re: Custom menu items - open in new window

par Jane Stradins,

Hey Joost, I've just tried your advice above, adding:

" target="_blank
and it worked for me!

Thank you

En réponse à Joost Elshoff

Re: Custom menu items - open in new window

par Michael Zehr,

I have the same problem.  I tried every variation I could think of with spaces and quotes and back-quotes but it seems once the moodle parser detects parameters being passed it consumes everything until the vertical bar, escaping as it goes and putting it into the URL 

I suppose one could make a local html with no parameters that automatically redirects to the correct page with parameters?  I don't think I'm going to do this, but I'm going to follow this in case someone else can fix it.

En réponse à Michael Zehr

Re: Custom menu items - open in new window

par ovsiknela .,

Hi all, for me worked this:

FORUM|/mod/forum/view.php&#63id=46"target="_blank

I replaced the question mark (?) in url with ascii code (&#63) for this symbol.

Nothing else helped..


Moyenne des évaluations Useful (2)
En réponse à ovsiknela .

Re: Custom menu items - open in new window

par Sarah Ashley,
Thank you so much!
This is the solution that worked for me as well, replacing the ? with the ascii ?
Awesome.
En réponse à ovsiknela .

Re: Custom menu items - open in new window

par William Pelissari,

Thank you very much Great solution. I was trying to switch from = to ASC, but after ? no longer recognized. Hadn't thought of changing the ?. 

Great solution. 

Thank you very much! 

Helped me a lot. 

Hugs