Making custom menu items open in moodle

Making custom menu items open in moodle

by g k -
Number of replies: 5

Hello,

I am trying to get custom menu items to open up within Moodle without being directed to a separate page. Any ideas on how to accomplish this?

I am running Moodle 3.0 and I am using the code " target="_blank to accomplish this.

For example   --Moodle|http://moodle.org" target="_blank  but this is not working.

Average of ratings: -
In reply to g k

Re: Making custom menu items open in moodle

by Andy Chaplin -

Very strange.

I copied and pasted your text into my Moodle and it worked fine.

The only possible thing I can see here is that you used a double minus at the start which is a sub-menu.  Does it work with a single minus?

Andy

In reply to Andy Chaplin

Re: Making custom menu items open in moodle

by g k -

Thanks for your input. I ended up using an iframe just because I wanted the link to open up within Moodle, not to another page.


In reply to g k

Re: Making custom menu items open in moodle

by Gary Lynch -

Hi

Andy is right with the double minus


To open custom menu in new window use

Linkname|https://www.Yoursite. com " target=\"_blank  this for first level link

If you want drop down menu then you do the following

Linkname|

-Linkname1|https://www.Yoursite. com " target=\"_blank

-Linkname2|https://www.Yoursite. com " target=\"_blank  

--Linkname2a|https://www.Yoursite. com " target=\"_blank

The minus denotes the positioning in the menu the more '-' the more navigation menu levels

To open in same window you dont need to use target

smileGarysmile

In reply to g k

Re: Making custom menu items open in moodle

by Jon Bolton -
Picture of Particularly helpful Moodlers Picture of Testers

target="_blank" will open in a tab/window.

No need for an iframe - if you want a link to open in the same window, use target="_self"

In reply to Jon Bolton

Re: Making custom menu items open in moodle

by g k -

Actually, I did need an iframe. Maybe I didn't explain this properly. I wanted to have the page open up WITHIN Moodle, not on another page.  The only way I was able to accomplish this was with an iframe.