The formatter field module provides a mechanism for specifying a formatter and formatter settings to be used for displaying a field, on a per-entity basis. By default, Drupal provides formatters and settings per entity bundle, but in certain situations it is necessary to choose the formatter at the entity level.
For example, say you have a page node with an image field. Normally, you would select an image style as the formatter, and all page nodes would use that same image style. With this module, you can add a formatter field to page nodes, which is hooked up to the image field. Then when the node is created or edited, the image style can be selected per-node.
Usage
- Add the field that will be dynamically formatted as usual.
- Add a formatter field to the entity bundle, just as you would with any other field.
- In the field instance settings, choose the field that will be formatted by this field.
- In the bundle display settings, select Formatter from field as the formatter for the field to be formatter. In the formatter settings, choose the correct formatter field.
Related modues
- Formatter Field Preset -- Adds a user-friendly widget for the formatter field so that site builders are able maintain a per-field list of presets. For each preset a nice title can be entered (e.g. 'Left-top photo with wrapping text') making simple for non-technical users to decide how to display the field when adding content.
- [D6, Sandbox] Renderer per node -- A similar module for Drupal 6.
Project information
- Seeking new maintainer
The current maintainers are looking for new people to take ownership. - Maintenance fixes only
Considered feature-complete by its maintainers. - 959 sites report using this module
- Created by zroger on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
* Drupal 9 and 10 compatibility * Semantic versioning
Development version: 2.0.x-dev updated 27 Jan 2024 at 11:35 UTC
Development version: 8.x-1.x-dev updated 5 Mar 2019 at 16:53 UTC
Development version: 7.x-1.x-dev updated 19 May 2018 at 14:38 UTC