I want creat new window when i click a menu link

cuxi's picture

hi, i newbie drupal. I have a litle website. I create a drupal website. A litle menu in drupal website link to other website. I want create new window when i click menu link.
How make it?

Groups:
Login to post comments

I don't think you can. It's

wishstik - Wed, 2008-09-17 01:43

I don't think you can. It's also bad usability to force links to open in a new window, but if you still want to, then have a look at themes -> garland -> page.tpl.php . In this file you can edit out 'primary links' and put in your own links (with target="blank" ). Take note that with this method, you will not be able to edit your links through Drupal anymore, but will instead manage them through that file.


Many ways to do this

laken's picture
laken - Wed, 2008-09-17 04:47

Maybe the simplest is to use this module:

http://drupal.org/project/extlink

Lots of other ways here:

http://drupal.org/node/75192

(Beware - some of these apply to Drupal 4.7, some to 5.x)


Thank rely wishstik@drupal.org

cuxi's picture
cuxi - Wed, 2008-09-17 04:47

I have two link menu for open new window. If i modify in theme then every thing menu link will open new window. I not want too. i think can modify modules menu. But i dont know more. How do you think? i can.


Thank alaken .

cuxi's picture
cuxi - Wed, 2008-09-17 04:48

Thank alaken .


A litle jQuery coding will

thehong - Fri, 2008-10-10 03:58

A litle jQuery coding will help you:

<script>
$('.foo .bar a').attr({'target': '_blank'});
</script>

--
Thế Hồng