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

extra_field_plus

2,093 sites Security covered
View on drupal.org

πŸ‡ΊπŸ‡¦

This module is maintained by at least one Ukrainian developer.
Please consider supporting Ukraine in a fight for their freedom and safety of Europe.

TL;DR

Extra Field Plus provides interfaces and plugin classes to create pseudo-fields (like extra_field) with editable display settings (addition by this module).
This is a developer module.

Problem solved

This module helps to create display-only 'extra_field' fields from plugins, including settings and settings summary, instead of using hook_entity_extra_field_info and reinventing the wheel again and again.

What is an extra_field (pseudo-fields)?

Pseudo-fields are basic display fields, which can be controlled from the display settings of a specific entity type (bundle). They are usually used, when you want to render data together with a particular entity type's data, but do not want to hard-code that data inside a template or preprocessor.

How to use

To provide your custom extra field plugin with display settings, you must at least implement the ExtraFieldPlusDisplayInterface.

But there are two base plugin classes which can help you with implementing your extra field settings plugin.
Just let your extra field settings plugin class extend either ExtraFieldPlusDisplayBase or ExtraFieldPlusDisplayFormattedBase.

All your extra field settings plugins have to be placed in your_custom_module/src/Plugin/ExtraField/Display folder.

Examples

For basic examples for extra field settings plugin classes, with simple and formatted outputs, checkout the extra_field_plus_example submodule.
You can find the examples here in the GitLab repository.

Dependencies

Versions

  • 3.x is the successor of 8.x-2.x with clean-ups, Layout Builder support and additional features like settings summary. New features go into this 3.x!
  • 8.x-2.x is the recommended and stable version. Bug fixes only, no new features. No layout builder support.

Alternatives

BC: Upgrading from 8.x-2.x to 3.x

When upgrading from 8.x-2.x to 3.x see the UPGRADE.md as breaking changes require you to upgrade your extra field plugins!

Activity

Total releases
1
First release
Apr 2025
Latest release
11 months ago
Release cadence
Stability
0% stable

Releases

Version Type Release date
3.0.0-beta5 Pre-release Apr 23, 2025