Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Entity fallback values

Security covered Under active development 6 sites

Part of the Entity ecosystem · 310 projects

This module allows you to define a priority order for entity fields so that if a field is empty, a value from the next field in the sequence is used. This avoids the need for custom code when you want to display content from one of several optional fields.

EntityFallbackValue provides developers with a flexible cascade system to retrieve entity field values based on defined priorities.

The problem it solves

When displaying content, you often want to show a value that can be carried by multiple optional fields. Instead of writing custom logic each time, EntityFallbackValue lets you define a priority chain once — if the first field is empty, it falls back to the next, and so on.

Features

  • Plugin system — define your own fallback chains with a structured, reusable plugin API
  • Token integration — use fallback values anywhere tokens are supported
  • Twig method — access fallback values directly in your templates

Example use case

An entity has three optional description fields: Long description, Description, and Chapô. You want to display whichever is filled in, in that priority order. Define the chain once via a plugin, then use the token or Twig method to retrieve the resolved value — no custom PHP needed at the template level.

Documentation

For installation and usage instructions, see the README.txt file included in the module repository.

Drupal 8–11

Ask your assistant about Entity fallback values

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
7
Tracked since
Jun 2023
Latest release
5 months ago
Releases (12 mo)
4 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.1.2 Stable 8–11 Jun 11, 2026
1.1.1 Stable 8–11 Jun 5, 2026
1.1.0 Stable 8–11 May 22, 2026
1.1.0-rc1 Pre-release 8–11 May 22, 2026
1.0.1-rc1 Pre-release 8–10 Sep 9, 2024
1.0.0 Stable 8–10 Jun 23, 2023
1.0.0-rc4 Pre-release 8–10 Jun 23, 2023