I want creat new window when i click a menu link

Events happening in the community are now at Drupal community events on www.drupal.org.
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?

Comments

I don't think you can. It's

wishstik's picture

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

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

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.

Tran Tan
Tel : 0905 403 723
http://baogame.vn/
http://Bienhoa.vn/

Thank alaken .

cuxi's picture

Thank alaken .

Tran Tan
Tel : 0905 403 723
http://baogame.vn/
http://Bienhoa.vn/

A litle jQuery coding will

thehong's picture

A litle jQuery coding will help you:

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

--
Thế Hồng

Paths

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week