Skip to main content
Drupal Documentation for SCLS

Main navigation

  • Home
  • How-To Info for Library Staff
  • Drupal 10
  • Help

Breadcrumb

  1. Home
  2. How-To Info for Library Staff
  3. Creating and Editing Website Content

Forcing Links to Open in a New Window or Tab

Forcing links to open in a new window or tab is not recommended. The best-practice advice on this topic is to avoid opening new windows/tabs without warning because:

  • it can be disorienting for some visitors
  • it resets the back button (using the back button in the new window won't take you back to the original window)
  • it takes control away from the visitor (they can choose to use Ctrl+click to open a regular link in a new tab, but they have no choice if we force a new window/tab to open)

There are specific scenarios where it is recommended, but generally it's discouraged for simply linking to external sites.

But if you still want to...

The Menu module provided with Drupal 10 does not provide functionality to force links to open in a new window or tab.

Links within Blocks, Articles, Basic Pages, etc. can be made to open in a new window or tab:

  1. Create the link using the Link button on the CKEditor toolbar.
  2. After the link is inserted, click on the link. The Link tooltip will appear. Select the Link properties button. 

    Image
    The Link properties button is part of the Link tootip
  3. In the Link properties tooltip, toggle the setting on (green). The default (gray) will open the link in the same window.
     

    Image
    Open in new window is a toggle in the Link properties tooltip
  4. Click the Save button.

Book traversal links for 2

  • Embed Codes
  • Up
  • Overriding Sitewide Theme Styling

Tags

accordion (1)
account (2)
anchors (1)
blocks (0)
cache (1)
carousel (2)
CKEditor (5)
configuration (1)
content types (1)
CSS (1)
disable rich-text (1)
Drupal 10 (15)
Drupal 9 (16)
email (2)
embed code (1)
Entity Registration (5)
events (6)
file browser (1)
files (4)
files media (1)
folders (1)
formatting (2)
front page (3)
Google Analytics (1)
headings (2)
HTML (1)
iframe (2)
images (4)
imce (1)
Layout Builder (3)
link a pdf (1)
links (5)
login (1)
media (2)
menus (3)
nodes (1)
openid (1)
paste as plain text (1)
paths (4)
performance (1)
photo albums (1)
photo galleries (1)
redirects (3)
registration (5)
remove format (1)
repeat dates (2)
reports (1)
revisions (1)
sidebars (0)
site name (1)
slogan (1)
source (1)
sticky (2)
text formats (1)
themes (1)
toolbar (2)
URL aliases (4)
Webform (2)
widget (1)