Double Field formatter

Categories

Component ID

2391763

Component name

Double Field formatter

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

This provides a more versatile formatter for the useful Double Field module, giving precise control over HTML tags and attributes. Double field is very good for presenting information as pairs of terms and definitions, e.g. technical specifications, where you do not know how many attributes you wish to describe. Using Display Suite Extras or Fences you can control the HTML around the field items, but have to rely on one the default formatters for the inner HTML or write custom theme function in your theme's template.php file. This module removes the need for theme overrides or custom templates.

  1. Choose custom tags for the wrapper, first and second items
  2. Define custom classes for the above tag
  3. Define prefix / suffixes for first and second elements (as in the default double field formatter)
  4. Define text format (as in the default double field formatter)

How to deploy

  1. Enable the module. It requires Double Field
  2. If you have not already done so, set up a custom double field.
  3. In your field display settings, select "Custom HTML tags and attributes" as your formatter
  4. Expand the gearwheel next to your field and override default options. The first and second element settings are expandable, but contracted by default.