Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

Linked Entity Reference provides a new field type which has a combination of link and entity reference capabilities. It lets you relate an entity with an arbitrary URL.

Motivation

In most situation entities are linked to the entity page (or to the file URI in case of media), but there are many situations where entities need to be linked to a different URL (internal or external).

One option is to add a link field to that entity plus some custom coding/theming to make that link as a wrapper to the entity, but that approach has a limitation: the link is part of the entity, so you can not link the same entity to different URLs on different situations. With this module, the URL is part of the field tha tlinks to the entity, so you can reference an entity and give it a URL to the link at field item level. URL's are always optional.

Use cases

There are many situations where this module can be used:

  • Real state features from a fixed collection linking them to pictures.
  • Select skills on a CV linking them to external resources.
  • Link media items to any page
  • Link reusable teasers...

Installation

  • Install the module with composer
    composer require drupal/linked_entity_reference
    
  • Enable the module.
    drush en linked_entity_reference
  • Add a field of type "Linked entity reference" to a fieldable entity bundle, such as node type, block type, etc.
  • Configure the form display. There are 2 widgets provided:
    • Autocomplete: Supported when referencing all entity types.
    • Media library: Supported when referencing media entities.
  • Configure the view display. There are 2 field formatters provided:
    • Label
    • Rendered entity

    Both work as their entity reference equivalent field formatters.

Slick and D11

There is a bug that may break Slick Carousel. See #3467129: Incompatibility with Drupal 11/jQuery 4.

Activity

Total releases
3
First release
May 2025
Latest release
7 months ago
Release cadence
53 days
Stability
67% stable

Release Timeline

Releases

Version Type Release date
1.0.1 Stable Sep 11, 2025
1.0.0 Stable Jun 26, 2025
1.0.0-alpha4 Pre-release May 29, 2025