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

Anchor Links ("Bookmarks")

Support for anchor links is available through the "Bookmarks" plugin for Drupal 10. Since the plugin refers to anchor elements as "bookmarks," this documentation will also call them bookmarks.

Contact SCLS to have Bookmarks enabled for your library's website. 

An bookmark link, anchor link, or "jump" link points to a specific point on a web page, instead of the default top of page. They are often used in tables of contents and FAQ lists.

Create a bookmark and make a link to it

Follow the steps to create a bookmark and make a link to it (from Drupal.org)

Linking to a bookmark in a menu link

Linking to a point lower on the page may be confusing to website visitors who expect that menu links will, by default, point to the top of a new page. That being said, it is possible to make menu links point to bookmarks.

The URL path for a menu link to a bookmark in a Drupal content page will look similar to this example:

/node/59#youranchorname

In your menu links, the "59" in "node/59" should be replaced with the number Drupal gave your destination page, and "#youranchorname" should be replaced with the name you gave the bookmark.

  1. For the menu link's path, enter the destination page title. Autocomplete will suggest a matching page. Select the page suggested by Autocomplete. It will insert a reference with a title and a number, like "Your Page Title (59)."
     

    Image
    On the Add menu link screen, the Link field shows the text "Research Links (59)"
  2. Delete the reference, but keep the number in mind.
  3. In the Link field, type the path as follows: /node/59 (replace "59" with the number for your page). 
    After the numerical path, type "#" followed by the bookmark name.
  4. Image
    On the Add menu link screen, the Link field contains the text "/node/59#youranchorlink"
  5.  Save the menu link.

Test your links

Try the links to make sure the point to the correct destinations.

Book traversal links for Anchor Links ("Bookmarks")

  • Creating and Editing Website Content
  • Up
  • Disable/Enable Rich-Text
  • Managing Accounts for Your Drupal Site
  • Images
  • Creating and Editing Website Content
    • Anchor Links ("Bookmarks")
    • Disable/Enable Rich-Text
    • Display Differences Between the Editing Form and Published Content
    • Eliminate problem link and image references
    • Embed Codes
    • Forcing Links to Open in a New Window or Tab
    • Overriding Sitewide Theme Styling
    • Accordions (show/hide sections)
    • Adding menu links
    • Glorious Guide to Keyboard Shortcuts
  • Uploading Files to Media
  • Changing Menu Links
  • Creating Photo Albums & Galleries
  • Folders, Directories, and File Structure
  • Blocks
  • Paths and URL Aliases
  • Configuring Site Information
  • Developer Permissions
  • Homepage Variations
  • Events/Programs with repeating dates
  • Registration for Events/Programs
  • What is Cron?
  • Avoid mixed content warnings (HTTPS/HTTP)
  • LINKcat Title List (Experimental)
  • Performance settings: Cache pages for anonymous users
  • Slick Carousel
  • Uploading Files with IMCE

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)