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.
By Anonymous (not verified) on
How Can I do all links go to a new window without using target="_blank" each time I put a link into a blog?
Thanks!!
Comments
a suggestion
add
<base target="_blank">
in the <head> area of your theme. that should make all links open to a new window as the default.
Not all
But I want only links posted into blogs do that.
You can't
Only way to do this would be to write some sort of filter that parsed [a href] tags and added/replaced a target attribute.
Look at the existing filter code.
OR
If it's just for links, you can use the weblink module, which has the option of whether or not to open a new window.
--
Boris Mann