Drupal 7 - How to Make a Link

There are multiple types of links, and different methods for making them.

screenshot illustratating 4 link buttons - link to content, link, unlink and anchor

 Linking to pages or files on the same Drupal site

When linking to your own content, it is best to use the Link to Content button in the HTML editor.  This method links to the content's ID number.  Drupal will rewrite the link using the node's URL path setting.  If the page's URL changes, Drupal will update the link to use the page's current URL.

  1. In the content, select the text that will be the link.
  2. Click Link to content.
  3. In the Search for content field, type in a word or two from the page title, or filename. A list of matching pages and files will be displayed.
  4. Select the desired page or file.  A URL path will be inserted in the Link URL field.
  5.  Click Insert Link.

Linking to pages or files on other websites

When linking to other websites, it is best to use the Link button in the HTML editor.

  1. Verify the URL of the webpage by visiting the page in a separate browser tab or window.
  2. Copy the URL from the browser's URL field.
  3. Return to the Drupal page's New Draft.
  4. In the content, select the text that will be the link.
  5. Click the Link button.
  6. Click in the URL field and paste the copied URL (using your keyboard command or the browser's Edit>Paste menu command).  Note: Drupal will automatically update the protocol field based on the URL you paste.
  7. Click OK.

Mailto Links (Email Addresses)

A mailto link is one that will open the user's default client, and begin to compose email to the specified email address.  While it is technically possible to use any text for a mailto link, on SSU Drupal sites, it is best practice to use the actual email address as link text.   This will allow visitors  to see and copy the email link if they are using a computer that is not configured with their default email client, such as a student using a computer lab.

Good: web.support@sonoma.edu
Not as good: Web Support

  1. Type the email address.
  2. Save and publish the page. Drupal automatically converts text in the form of an email address to a mailto link.  

Pre-filled subject or message body

You can make a mailto link compose a message with the subject or message body.

  1. Insert your cursor where you want the link.
  2. Click the Link button.
  3. Click the Link Type select button, and choose E-mail.
    • In the E-mail Address field, type the address.
    • In the Message Subject field, type the subject.
    • In the Message Body field, type the message.
  4. Click OK.