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).

entity_reference_override

1,974 sites Security covered
View on drupal.org

An entity reference field paired with an accompanying text field. This custom text field on the referencing entity can be used to:

  • override the linked entity's title
  • override any text field or text area (including WYSIWYG) on the referenced entity
  • add an extra class to its rendered output, or
  • override the default display mode for the field on an entity-by-entity basis.

Use cases

  • You're building "related article" lists or aggregate pages that use entity references to pull in other articles, but you need to tweak the appearance of individual entities for contextual relevance or emphasis.
  • Give per-project job roles to people credited on a project.
  • Provide a contextually-relevant short bio for an author referenced from a piece of article content.

If you need it, you're feeling happy right now.

Post-Installation (Usage)

Go to the Manage fields tab of any fieldable entity, for example Administration » Structure » Content types » Article » Manage fields for the article content type. Press Add field, and using the Add a new field dropdown, scrolling to under Reference, select "Entity reference w/custom text", provide a label for your entity referencing field, and then press Save and continue.')

On the resulting page, select what type of item to reference and allowed number of values as you would for any entity reference field, and Save field settings.

Community Documentation

We have documentation started at Entity Reference Override documentation, edits and new pages there welcome!

Based on the approach of extending a field type in Drupal 8 by Lullabot's Matt Robison.

Similar Modules

See Media Library Media Modify for a better and more robust approach to referenced media.

If you do not need the secondary field to be an optional override of a value from the referenced entity, that is if you find yourself making a field that will never be used on the original content just to "override" it with this module, you are better off with the Custom Field module.

Supporting this Module

You can support Agaric's overall contributions to Drupal and a bit beyond by supporting Drutopia at opencollective.com/drutopia. Thanks!!

Activity

Total releases
2
First release
Jan 2025
Latest release
1 year ago
Release cadence
80 days
Stability
0% stable

Releases

Version Type Release date
2.0.0-beta4 Pre-release Apr 11, 2025
2.0.0-beta3 Pre-release Jan 21, 2025