Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
About this module
Provides a field formatter for entity reference fields that allows back-filling values when a field is not completely populated by finding content with matching terms.
Items with the most matching terms are shown first.
The formatter allows you to configure:
- the view-mode used to render the related items;
- the quantity of items to display (up to the field maximum); and
- which vocabularies to give precedence to when selecting matching terms
- match mode for vocabularies (any/all/all with fallback)
Features
- Supports any entity-reference field where the target type is a content-entity
Use Cases
Add a 'related articles' field that allows curation but with a fallback if not populated
Demo
Evaluate this project online using simplytest.me.
Requirements
- Requires the Taxonomy entity index module.
- PHP 7
- Drupal core 8.7.7+
Installation
composer require "drupal/backfill_formatter"
- Enable the module using drush or in 'Extend'. (/admin/modules)
- Find a content-type or entity you want to use the formatter on and visit its 'Manage display' page
- Select the 'Back-fill by terms' formatter and configure as required.
Known Issues/Limitations
- Layout builder won't show empty fields that use this formatter, apply the patch from #3067982: Formatters for empty fields do not render with layout builder enabled
- Tests won't pass until #3104318: Create tests and a config schema for taxonomy_entity_index.settings is merged
Please use the issue queue to report issues.
Similar modules
- Similar by terms - however this uses a blocks based approach and only works with nodes.
Author/Maintainer
Supporting organizations:
Maintenance
Project information
- Module categories: Content Display, Site Structure
- Ecosystem: Taxonomy Entity Index
- 12 sites report using this module
- Created by larowlan on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.