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 genemcc on
It seems that nearly every link generated in Drupal loads the page over the existing one. Where should I be looking to change the code to force outside links to open in a new window or tab? What I am trying to achieve is that a link to another page on the site would stay in one window but links to external sites would force a new window.
Thanks!
Comments
maybe theme it
do some logic in a custom theme, test url and target="_blank" for external links to force them to open in a new window.
It's one way to do it though other people may know a better way