Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
how can i add a target="_blank" to the go/test link in my Navigation menu (and Primary/Secondary Links), if this link is redirecting to an external site? If this is possible this should be a configurable per go-URL option...
Any idea?
Comments
Comment #1
jredding CreditAttribution: jredding commentedI don't think this is an issue for the Go two module, it handles target=_blank just fine. The primary and secondary links, however, don't have an option for them.
I think this issue needs to be moved over to the menu module/core
Comment #2
hass CreditAttribution: hass commentedok
Comment #3
killes@www.drop.org CreditAttribution: killes@www.drop.org commentednew features go into devel version.
Comment #4
keesje CreditAttribution: keesje commentedPut this in your template.php
Explaination: Filters all external links (starting with http), and links where path contains _blank and add target="_blank" property.
Just add _blank to the path of the node and you're ok.
Thanks to trantt for his post.
Regards.
Maatwerk in webapplicaties
Comment #5
Paul Natsuo Kishimoto CreditAttribution: Paul Natsuo Kishimoto commentedkilles was right, but let's set it to 4.7.x-dev.
Is this fixed? If so, please close the issue.
Comment #6
Zen CreditAttribution: Zen commentedDuplicate of http://drupal.org/node/102669
Comment #7
trantt CreditAttribution: trantt commentedcan someone help us with version 5 syntax? return l($item['title'], $link_item['path'], isset($item['description']) ? array('title' => $item['description'], 'target' => '_blank') : array('target' => '_blank')); is not working on version 5
Comment #8
coderintherye CreditAttribution: coderintherye commentedDid you try 'target' => 'blank' or in other words taking out the underscore? That works for me in D5. For a more thorough look at this problem take a look at my post here about it http://www.nowarninglabel.com/home/node/13
Comment #9
ranj.sarraj CreditAttribution: ranj.sarraj commentedHere is the solution ;-)
http://drupal.org/node/335853#comment-2278626
Comment #10
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer commentedSome contrib modules provide this:
Bear in mind there is an accessibility issue with target=_blank. F22: Failure of Success Criterion 3.2.5 due to opening windows that are not requested by the user.