Provides a field formatter that can attempt multiple formatters and the first one that returns output wins.
PHP JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config/schema
src
tests/fallback_formatter_test
.travis.yml
DEVELOPING.md
README.md
composer.json
fallback_formatter.admin.js
fallback_formatter.info.yml
fallback_formatter.libraries.yml
fallback_formatter.module

README.md

Fallback Formatter

Travis build status Scrutinizer code quality Fallback Formatter provides a field formatter that can attempt multiple formatters and the first one that returns output wins.

Installation

  1. Download Fallback Formatter from Drupal.org.
  2. Install it in the usual way.

Usage

Setup field formatter:

  • On admin/structure/types choose the content type you want to use for fallback formatter, for example Article.
  • Select Manage Display and go to admin/structure/types/manage/article/display.
  • Choose a field you want to use and in formatter settings define Fallback as the format.
  • In formatter settings under Enabled formatters check the formatters you want to use.
  • Under Formatter processing weight you can order the formatters, the first one that returns some result will be used.
  • Bellow the Formatter processing weight you can define settings for each enabled formatter if available.