Internal Links

HarvardSites Drupal provides content management features to help you create and maintain a stable site structure, with a focus on ways to preserve links between content items as your site evolves and changes. 

Key to these features is how Drupal manages content items, or “nodes.” A node is a particular piece of content, and includes all details stored for the content type. For example, an Events node includes the event title and description, as well as associated details about the event — format, date and time, location — and about the node itself — authoring details, taxonomy terms, revision history. 

Because the platform identifies content using node IDs, you can make changes, and even change a content item name, without breaking the site structure.

To take advantage of this stability, internal links — that is, links to content within the site — should be established using a node ID wherever possible, rather than linking to the full URL of the item. For example, links to this page within the User Guide site use the node ID (/node/445) rather than the URL (https://drupal.harvardsites.harvard.edu/resource/internal-links).

Selecting a node involves working with autocomplete fields. These are fields that auto-populate with matching content. For example, when creating or editing content using the text editor, you create a link by selecting text and then selecting the Link button (see Text Editor for details about using the text editor toolbar). After typing a few letters of the content item in the Link URL autocomplete field, a dropdown list of matching content appears.

screenshot of adding a link to text and looking up the linked item

After selecting a content item, the Link URL field updates to show the node ID. That internal link will remain functional, even if the source or destination changes.

screenshot for adding a link a text

Related how-tos

Linking to a file

How to create and link to a downloadable file resource, and how to update the file with a newer version.

View from below of a person ascending a spiral staircase.

Related resources

Content URLs

How content URLs are generated and managed on the platform.

A modern building with a grid-like facade of metallic panels and glass windows.
See also: