I would like to make it possible to open a new tab when you click on an external link of main menu (rather than go directly to the link page, which is the default set-up).
I found the menu target module, but it causes errors for me. Do you have any other suggestion?
I tried that module, but it doesn’t seem to work as I want for the two following reasons:
I want to be able to select from the respective menu link if the page will be opened in a new tab or not, but this module doesn’t have this feature. Fortunately, I solved my problem when I enabled Menu Attributes module
It doesn’t recognize the other Cern pages as external links, because they are under the same domain (cern.ch)
Apart from menu links I would like to have the similar functionality (to open external links in a new tab) for Article box, could you add this functionality as a check box under the selected link (inside the LINK of the following image)?
Actually the module works fine. I have just enabled it in one of my test sites. Then I enable the option to open external links in new windows and worked ad expected. You can also specify patterns on which type of links should be excluded.
I unchecked “Exclude links with the same primary domain” and it worked perfectly.
In my case your solution was what I wanted. I guess my article only make sense when you want to open an internal link in a new page or you want it to do it exceptionally for few external links. I will update it!
In my case @sboutas proposal to use External Links solved my problem with external links, because I wanted to apply this functionality to each and every external links.
Nevertheless, someone may want to do the same functionality for internal links or few exceptional external links. I would like to write the following article in order to share the solutions I found for the respective problem with you.
Opening external links in a new tab
Just install External Links module and uncheck “Exclude links with the same primary domain” from module’s settings
Opening an internal link in a new tab (or an exceptional external link)
You may want to open an external link (or even an internal one) in a new tab. Two of the most common cases are the following:
Links in pages, a custom blocks or headers / footers of view:
Once you have written your html code using the “Unfiltered” Text format, just add target="_blank" inside the <a> tag of the link you want it to be opened in a new tab
Links in the main menu:
At first you will need to enable Menu Attributes module. Then, go to the menu link you want it to be opened in a new tab, open Menu link attributes and select “_New windows (blank)” as a Target