I want all external links to open in a new browser window. How is this possible? All inputs on this are welcome.

Thanks.

Comments

tm’s picture

for 5.x, there is the external links module. maybe you can start there for hints (or upgrade, if feasible).

i would guess that sticking the deprecated target="_blank" attribute into every link is not an option? and it does not work on menu items, as far as i know.

until a better suggestion comes along...

bwv’s picture

Livbit, to expand on tm's comment: you could download your DB, then in a text editor do a search and replace to add the target="_blank" where it is supposed to go.
----------------------------------------------------------------------
http://www.bwv810.com/

I am a writer and researcher. In my spare time I build websites with Drupal.
Je peux communiquer en français. / Я могу общаться на русском языке.

ultimateboy’s picture

The external links module is the way to go. It works great. The description of the module says that it adds an icon next to external links, but this is configurable in the module settings. Works like a charm.

--matt
http://www.monarch-digital.com

-- matt tucker

bwv’s picture

I just uploaded and activated external links on my site. It is indeed remarkable.
----------------------------------------------------------------------
http://www.bwv810.com/

I am a writer and researcher. In my spare time I build websites with Drupal.
Je peux communiquer en français. / Я могу общаться на русском языке.

browserspot’s picture

I made some changes to the template & theme file...It worked.

latest1999’s picture

Is there a way to make this selective? Meaning that when I create a Navigation item that is external I can choose whether it is an external link or an internal link. This seems like it should be a basic feature and core to the application.

thomjjames’s picture

You could use some jQuery:

$('a[href^="http://"]').attr("target", "_blank"); 

Tom
______________________________________________
http://drupalsn.com/user/thomjjames - My DrupalSN Profile
http://drupalsn.com/drupal-tutorials

______________________________________________
https://tomswebstuff.com